mirror of
https://github.com/leitbogioro/Tools.git
synced 2025-09-30 10:24:31 +08:00
Update InstallNET.sh
This commit is contained in:
parent
5526af9dd9
commit
a89909040f
1 changed files with 5 additions and 2 deletions
|
@ -994,8 +994,11 @@ 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 '.gz') != "" || "$setFileType" == "gz" || "$setFileType" == "" ]]; then
|
||||||
DEC_CMD="gunzip -dc"
|
DEC_CMD="gunzip -dc"
|
||||||
[[ "$setFileType" == "xz" ]] && DEC_CMD="xzcat"
|
elif [[ $(echo "$DDURL" | grep '.xz') != "" ]] || [[ "$setFileType" == "xz" ]]; then
|
||||||
|
DEC_CMD="xzcat"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo 'Please input vaild image URL! ';
|
echo 'Please input vaild image URL! ';
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue