Update InstallNET.sh

This commit is contained in:
Molly Lau 2022-11-28 10:44:12 +09:00 committed by GitHub
parent 5526af9dd9
commit a89909040f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -994,8 +994,11 @@ if [[ "$ddMode" == '1' ]]; then
echo "$DDURL" | grep -q '^http://\|^ftp://\|^https://';
[[ $? -ne '0' ]] && echo 'Please input vaild URL, Only support http://, ftp:// and https:// !' && exit 1;
# Decompress command selection
DEC_CMD="gunzip -dc"
[[ "$setFileType" == "xz" ]] && DEC_CMD="xzcat"
if [[ $(echo "$DDURL" | grep '.gz') != "" || "$setFileType" == "gz" || "$setFileType" == "" ]]; then
DEC_CMD="gunzip -dc"
elif [[ $(echo "$DDURL" | grep '.xz') != "" ]] || [[ "$setFileType" == "xz" ]]; then
DEC_CMD="xzcat"
fi
else
echo 'Please input vaild image URL! ';
exit 1;