Update cmurl.sh

This commit is contained in:
tianyu 2015-03-04 09:53:46 +08:00
parent 7df4069002
commit 44157292f2
1 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
# Please read cm.sh and cyanogenmod.crontab.list too.
URL=$1 URL=$1
TARGET=$2 DEVICE=$2
TARGET=$DEVICE.zip
DIRECTORY=$3 DIRECTORY=$3
BYPY='/root/bypy/bypy.py' BYPY='/root/bypy/bypy.py'
@ -22,7 +25,7 @@ fi
if [ ! -d "$DIRECTORY" ];then if [ ! -d "$DIRECTORY" ];then
echo "ERROR DIR" echo "ERROR DIR"
exit 0 mkdir -p "$DIRECTORY"
fi fi
if [ -f "$DIRECTORY/$ZIP.done" ];then if [ -f "$DIRECTORY/$ZIP.done" ];then
@ -43,7 +46,7 @@ wget $URL > $ZIP.wget.log 2>&1
md5sum $ZIP > $ZIP.md5 md5sum $ZIP > $ZIP.md5
$BYPY -v --disable-ssl-check -s 10MB syncup . cyanogenmod $BYPY -v --disable-ssl-check -s 10MB syncup . cm/$DEVICE
if [ -f "$DIRECTORY/$ZIP" ];then if [ -f "$DIRECTORY/$ZIP" ];then
rm "$DIRECTORY/$ZIP" rm "$DIRECTORY/$ZIP"