view nonfree/gpc/debian/cvsdir.sh @ 0:6b33357c7561 octave-forge

Initial revision
author pkienzle
date Wed, 10 Oct 2001 19:54:49 +0000
parents
children
line wrap: on
line source

#! /bin/bash

# File: cvsdir.sh
# Description: Save and restore CVS dirs under current dir.  This is
#   useful for genrating a Debian package without the CVS
#   administrative directories, but getting them restored later.
# Author: Rafael Laboissi�re <rafael@icp.inpg.fr>
# Created on: Mon Feb 12 18:06:37 CET 2001
# Last modified on: Mon Feb 12 18:07:48 CET 2001
# $Id$


cvsdirs=`find . -type d -and -name CVS`
cvstar=../cvs.tar

case "$1" in
  save) 
    if [ -n "$cvsdirs" ] ; then 
      tar cf $cvstar $cvsdirs
      rm -rf $cvsdirs
    else
      echo "W: No CVS dirs under ." 1>&2
    fi
  ;;
  restore)
    if [ -f $cvstar ] ; then
      tar xf $cvstar
    else
      echo "E: File $cvstar not found" 1>&2
    fi
  ;;
  *)
    cat 1>&2 <<EOF
Usage $0 <save|restore>
EOF
  ;;
esac