tasks queue
This commit is contained in:
parent
7bb22bb4d4
commit
0383cfd0d8
7 changed files with 30 additions and 21 deletions
20
data/action.sh
Executable file
20
data/action.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue