Update download.sh

This commit is contained in:
Jerry Ma 2021-12-18 02:28:07 +08:00 committed by GitHub
parent cae4e23872
commit 8dd87eda01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ else
archive_file_tar=$(find . -name "$1*.*" | grep -E ".tar|.gz|.tgz" | tail -n1)
archive_file_zip=$(find . -name "*.zip" | tail -n1)
if [ "$archive_file_tar" != "" ]; then
tar -zxvf $archive_file_tar && mv $archive_file_tar $SELF_DIR/source/cache/$1.tgz
tar -zxf $archive_file_tar && mv $archive_file_tar $SELF_DIR/source/cache/$1.tgz
elif [ "$archive_file_zip" != "" ]; then
unzip $archive_file_zip && mv $archive_file_zip $SELF_DIR/source/cache/$1.zip
else
@ -56,4 +56,4 @@ else
echo "Download $1 failed! (at $?)"
exit 1
fi
fi
fi