Update cmurl

This commit is contained in:
tianyu 2015-01-24 11:40:28 +08:00
parent 0f52b7ee79
commit 78f6472e87
1 changed files with 16 additions and 2 deletions

18
cmurl
View File

@ -1,4 +1,5 @@
#!/bin/bash
URL=$1
TARGET=$2
DIRECTORY=$3
@ -14,7 +15,7 @@ echo $URL
ZIP="${URL##*/}"
echo $ZIP
if [ -f "$DIRECTORY/$ZIP" ];then
if [ -f "$DIRECTORY/$ZIP" ];then
echo "DOWNLOADED"
exit 0
fi
@ -31,6 +32,19 @@ wget $URL > $ZIP.wget.log 2>&1
md5sum $ZIP > $ZIP.md5
alias bypy='/root/bypy/bypy.py'
bypy -v -s 10MB syncup
bypy -v -s 10MB syncup . cyanogenmod
if [ -f "$DIRECTORY/$ZIP" ];then
rm "$DIRECTORY/$ZIP"
fi
if [ -f "$DIRECTORY/$ZIP.md5" ];then
rm "$DIRECTORY/$ZIP.md5"
fi
if [ -f "$DIRECTORY/$ZIP.wget.log" ];then
rm "$DIRECTORY/$ZIP.wget.log"
fi
cd -