Update z2t.sh
This commit is contained in:
parent
a8f9156b67
commit
0e4f928ad9
35
z2t.sh
35
z2t.sh
|
@ -8,22 +8,25 @@
|
||||||
#bash_version :4.3.11(1)-release
|
#bash_version :4.3.11(1)-release
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
||||||
if [ $1 = "-c" ]; then
|
if [ $1 = "-c" ]; then
|
||||||
echo "cleaning..."
|
echo "cleaning..."
|
||||||
cd tars
|
if [ $2 = "-i" ]; then
|
||||||
for file in *.tar; do
|
PARAM = "-i"
|
||||||
ZIP="${file%%.tar*}.zip"
|
fi
|
||||||
echo "check \"$ZIP\" ..."
|
cd tars
|
||||||
if [ -f "../$ZIP" ];then
|
for file in *.tar; do
|
||||||
echo "delete $ZIP ..."
|
ZIP="${file%%.tar*}.zip"
|
||||||
rm -i "../$ZIP"
|
echo "check \"$ZIP\" ..."
|
||||||
else
|
if [ -f "../$ZIP" ];then
|
||||||
echo "$ZIP not exist."
|
echo "delete $ZIP ..."
|
||||||
fi
|
rm $PARAM "../$ZIP"
|
||||||
done
|
else
|
||||||
cd ..
|
echo "$ZIP not exist."
|
||||||
rm -ri tars
|
fi
|
||||||
exit 0
|
done
|
||||||
|
cd ..
|
||||||
|
rm -r $PARAM tars
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check_sub(){
|
check_sub(){
|
||||||
|
|
Loading…
Reference in New Issue