36 lines
650 B
Plaintext
36 lines
650 B
Plaintext
|
#!/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 PLEIN="NON"
|
||
|
|
||
|
set LISTE=`/bin/ls -1 | wc -l`
|
||
|
|
||
|
if ( "$LISTE" != "0" ) then
|
||
|
set PLEIN="OUI"
|
||
|
endif
|
||
|
|
||
|
if ( "$PLEIN" == "NON" ) 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 " "
|