Skip to content

Commit

Permalink
Check if the Debian ISO file exists
Browse files Browse the repository at this point in the history
Check if the Debian ISO file exists in the current directory; if not, download it
  • Loading branch information
mapi68 authored Oct 27, 2023
1 parent acb8122 commit ca3bab0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Require these packages.

echo "========================================================"
echo "sudo apt install qemu qemu-system-mips qemu-utils"
sudo apt install qemu qemu-system-mips qemu-utils
echo "sudo apt install qemu-system-mips qemu-utils"
sudo apt install qemu-system-mips qemu-utils -y

#--------------------------------------------
# Enable qcow mounter.
Expand All @@ -32,9 +32,10 @@ fi

cd artifacts

# Choose mirror server and latest image file.
# Check if the Debian ISO file exists in the current directory; if not, download it.
if [ ! -f debian-*.iso ]; then
wget http://cdimage.debian.org/cdimage/release/current/mipsel/iso-cd/debian-11.3.0-mipsel-netinst.iso
DEBISO=$(curl -s https://cdimage.debian.org/debian-cd/current/mipsel/iso-cd/SHA256SUMS | grep "debian" | awk '{print $2}')
wget http://cdimage.debian.org/cdimage/release/current/mipsel/iso-cd/$DEBISO
fi

cd ..
Expand Down

0 comments on commit ca3bab0

Please sign in to comment.