Update InstallNET.sh

This commit is contained in:
Molly Lau 2022-11-28 13:53:13 +09:00 committed by GitHub
parent 8f5dd67225
commit 018e25ca98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -992,10 +992,14 @@ if [[ "$ddMode" == '1' ]]; then
echo "$DDURL" | grep -q '^http://\|^ftp://\|^https://'; echo "$DDURL" | grep -q '^http://\|^ftp://\|^https://';
[[ $? -ne '0' ]] && echo 'Please input vaild URL, Only support http://, ftp:// and https:// !' && exit 1; [[ $? -ne '0' ]] && echo 'Please input vaild URL, Only support http://, ftp:// and https:// !' && exit 1;
# Decompress command selection # Decompress command selection
if [[ $(echo "$DDURL" | grep -o ...$) == ".gz" ]] || [[ "$setFileType" == "gz" ]]; then if [[ "$setFileType" == "gz" ]]; then
DEC_CMD="gunzip -dc" DEC_CMD="gunzip -dc"
elif [[ $(echo "$DDURL" | grep -o ...$) == ".xz" ]] || [[ "$setFileType" == "xz" ]]; then [[ $(echo "$DDURL" | grep -o ...$) == ".xz" ]] && DEC_CMD="xzcat"
elif [[ "$setFileType" == "xz" ]]; then
DEC_CMD="xzcat" DEC_CMD="xzcat"
[[ $(echo "$DDURL" | grep -o ...$) == ".gz" ]] && DEC_CMD="gunzip -dc"
else
DEC_CMD="gunzip -dc"
fi fi
else else
echo 'Please input vaild image URL! '; echo 'Please input vaild image URL! ';
@ -1055,9 +1059,7 @@ else
exit 1; exit 1;
fi fi
if [[ "$linux_relese" == 'debian' ]]; then if [[ "$linux_relese" == 'debian' ]]; then
if [[ "$IsCN" == "cn" ]]; then [[ "$IsCN" == "cn" ]] && FirmwareImage="cn"
FirmwareImage="cn"
fi
if [[ "$IncFirmware" == '1' ]]; then if [[ "$IncFirmware" == '1' ]]; then
if [[ "$FirmwareImage" == "cn" ]]; then if [[ "$FirmwareImage" == "cn" ]]; then
wget --no-check-certificate -qO '/tmp/firmware.cpio.gz' "https://mirrors.ustc.edu.cn/debian-cdimage/unofficial/non-free/firmware/${DIST}/current/firmware.cpio.gz" wget --no-check-certificate -qO '/tmp/firmware.cpio.gz' "https://mirrors.ustc.edu.cn/debian-cdimage/unofficial/non-free/firmware/${DIST}/current/firmware.cpio.gz"