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