mirror of
https://huihui.cat/mirrors/MikroTikPatch.git
synced 2025-12-10 03:24:37 +01:00
Update chr.sh
Signed-off-by: elseif <elseif@live.cn>
This commit is contained in:
parent
2babd89f27
commit
c40954115b
1 changed files with 8 additions and 1 deletions
9
chr.sh
9
chr.sh
|
|
@ -50,7 +50,14 @@ if [[ "$confirm" =~ ^[Nn]$ ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "FILE: $(basename $IMG_URL)"
|
echo "FILE: $(basename $IMG_URL)"
|
||||||
wget --no-check-certificate -O /tmp/chr.img.zip "$IMG_URL" || { echo "Download failed!"; exit 1; }
|
if command -v wget >/dev/null 2>&1; then
|
||||||
|
wget --no-check-certificate -O /tmp/chr.img.zip "$IMG_URL" || { echo "Download failed!"; exit 1; }
|
||||||
|
elif command -v curl >/dev/null 2>&1; then
|
||||||
|
curl -L --insecure -o /tmp/chr.img.zip "$IMG_URL" || { echo "Download failed!"; exit 1; }
|
||||||
|
else
|
||||||
|
echo "Neither wget nor curl is installed. Cannot download $url"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
cd /tmp
|
cd /tmp
|
||||||
unzip -p chr.img.zip > chr.img
|
unzip -p chr.img.zip > chr.img
|
||||||
if LOOP=$(losetup -Pf --show chr.img 2>/dev/null); then
|
if LOOP=$(losetup -Pf --show chr.img 2>/dev/null); then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue