mirror of
https://github.com/leitbogioro/Tools.git
synced 2024-11-15 21:54:40 +08:00
Update InstallNET.sh
This commit is contained in:
parent
8f5dd67225
commit
018e25ca98
1 changed files with 7 additions and 5 deletions
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue