web/server.sh
2026-04-14 16:56:54 +02:00

20 lines
471 B
Bash

# the shittiest server and CI you can imagine :3
# update pastaprocess.sh (only once to prevent XSS)
cp process.sh ~/pastaprocess.sh
# prevent shell from reloading upon file change
exec bash << "EOF"
bash ~/pastaprocess.sh
cd serve
python3 -u -m http.server 7573 2>&1 | while read req ; do
echo "$req"
if echo "$req" | grep do-pull ; then
cd ..
git fetch origin main -a
git reset --hard origin/main
bash ~/pastaprocess.sh
cd serve
fi
done
EOF