arch-maride-flavour/install.sh
2017-08-06 12:07:46 +02:00

59 lines
1.4 KiB
Bash
Executable File

#!/bin/sh
echo "HOI, this is the 'Arch w/ maride flavour' install script (chainloader)"
echo "Hope you used TLS..."
echo -e "=-=-=-=-=-=-=-=-=-=-=\n"
echo "=> Things you should've set up already:"
echo " * Your keyboard layout (consider passwords!)"
echo " * Any RAID setup that you are planning to set up"
echo " * An internet connection (DHCP or static, idc...)"
echo -n "=> Did you set that up? (y/N) "
read answer
if [ "$answer" != "y" ]; then
echo "OK, then do necessary steps and see you soon."
exit 1
fi
echo "=> Please enter the full path to the block device the installation should take place on: (e.g. /dev/sda)"
echo " Make sure to choose a drive, not a partition."
echo " Hint: here's a list of devices that may be the right:"
ls /dev/sd* /dev/mmc* 2>/dev/null
echo -n "Install to: "
read blockdevice
export blockdevice
for check in checks/*.check
do
echo "=> Running check '$check'..."
$check
return=$?
if [ "$return" -ne 0 ]; then
echo "=> Check failed. Fix it, maybe."
exit
fi
done
for step in steps/*.step
do
echo "=> Running step '$step'..."
$step
return=$?
if [ "$return" -ne 0 ]; then
echo "=> Step failed. That is weird. Sorry. Check logs maybe."
exit
fi
done
for flavour in flavours/*.flavour
do
echo "=> Running flavour '$flavour'..."
pushd $flavour
$flavour/run.sh
return=$?
if [ "$return" -ne 0 ]; then
echo "=> Flavour failed. :("
fi
done