diff --git a/cmurl b/cmurl index 6bc8747..65b658b 100644 --- a/cmurl +++ b/cmurl @@ -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 -