20 lines
302 B
Bash
Executable file
20 lines
302 B
Bash
Executable file
#!/usr/bin/bash
|
|
set -euo pipefail
|
|
if [ ! -e state ]; then
|
|
echo 0 > state
|
|
fi
|
|
case "$(cat state)" in
|
|
0)
|
|
./data/setup.sh
|
|
;;
|
|
1)
|
|
./data/install.sh
|
|
;;
|
|
2)
|
|
echo Installed in $(($(date +%s)-$(cat start)))s
|
|
rm -r *
|
|
exit
|
|
esac
|
|
echo "$((1+$(cat state)))" > state
|
|
reboot
|
|
exit 1
|