alliance/dev/scripts/misc/genspaetc

29 lines
564 B
Tcsh
Executable File

#!/bin/csh
# batch generique d'installation sur sparc des executables
if ( "$1" == "" ) then
echo "$0 prend comme premier parametre le source"
exit
endif
if ( "$2" == "" ) then
echo "$0 prend comme deuxieme parametre la destination"
exit
endif
set SCEDIR=$1
set DSTDIR=$2
cd $SCEDIR
set FILES=`/bin/ls`
if ( "$FILES" == "" ) then
echo "aucun fichier. "
exit
endif
cd $DSTDIR
foreach FILE ( $SCEDIR/* )
set FIC=`basename $FILE`
echo -n $FIC" "
/bin/rm $DSTDIR/$FIC >& /dev/null
cp -r $SCEDIR/$FIC $DSTDIR
end
echo " "