tasks queue

This commit is contained in:
bogale 2026-09-26 01:48:54 +09:00
commit 0383cfd0d8
7 changed files with 30 additions and 21 deletions

20
data/action.sh Executable file
View 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