Menu

[r436]: / demo / archive.sh  Maximize  Restore  History

Download this file

12 lines (11 with data), 219 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#!/bin/sh
NAME=$1
EXT=`date +%F`
CWD=`pwd`
i=1
while [ -f ../$NAME-$EXT-$i.tar.gz ];
do
i=`expr $i + 1`
done
(cd ../; tar cvf $NAME-$EXT-$i.tar `basename $CWD` ;gzip -9 $NAME-$EXT-$i.tar)
echo "$NAME-$EXT-$i.tar.gz"
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.