22 lines
712 B
Bash
Executable file
22 lines
712 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# download latest ISO if not already in /tmp
|
|
case $1 in
|
|
alma)
|
|
latest="9"
|
|
if [ ! -f /tmp/alma-${latest}.iso ];then
|
|
wget http://mirror.wdc2.us.leaseweb.net/almalinux/${latest}/isos/x86_64/AlmaLinux-${latest}-latest-x86_64-minimal.iso -O /tmp/alma-${latest}.iso
|
|
fi
|
|
echo "/tmp/alma-${latest}.iso"
|
|
;;
|
|
archlinux)
|
|
;&
|
|
*)
|
|
#defaults to arch
|
|
latest=`date -d yesterday +"%Y.%m.01"`
|
|
if [ ! -f /tmp/arch-${latest}.iso ];then
|
|
wget https://mirror.arizona.edu/archlinux/iso/${latest}/archlinux-${latest}-x86_64.iso -O /tmp/arch-${latest}.iso
|
|
fi
|
|
echo "/tmp/arch-${latest}.iso"
|
|
;;
|
|
esac
|