]> git.armaanb.net Git - bin.git/blob - web-update-server
passmenu: quote variables
[bin.git] / web-update-server
1 #!/usr/bin/env bash
2 # Executed over SSH on builds.sr.ht for my websites
3
4 set -e
5
6 gitrun() {
7   git -C $dir reset --hard
8   git -C $dir pull origin main --rebase
9 }
10
11 if [[ $1 == "gemini" ]]; then
12   dir=/var/www/armaanb.net-gemini
13   gitrun
14   (cd /var/www/armaanb.net-gemini ; make)
15 elif [[ $1 == "gopher" ]]; then
16   dir=/var/www/armaanb.net-gopher
17   gitrun
18 elif [[ $1 == "fortune" ]]; then
19   dir=/var/www/fortune-online
20   gitrun
21 elif [[ $1 == "http" ]]; then
22   dir=/var/www/armaanb.net-http
23   gitrun
24   (cd /var/www/armaanb.net-http ; make -B)
25 fi