| 1 | #!/bin/sh |
| 2 | # Installeert BlueGit op Arch zonder makepkg. |
| 3 | # Gebruik: sudo packaging/install.sh |
| 4 | set -eu |
| 5 | root=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd) |
| 6 | cd "$root" |
| 7 | export CGO_ENABLED=0 |
| 8 | go build -trimpath -ldflags='-s -w' -o bluegit ./cmd/bluegit |
| 9 | install -Dm755 bluegit /usr/bin/bluegit |
| 10 | install -Dm644 packaging/bluegit.service /usr/lib/systemd/system/bluegit.service |
| 11 | install -Dm644 packaging/sysusers.conf /usr/lib/sysusers.d/bluegit.conf |
| 12 | install -Dm644 packaging/tmpfiles.conf /usr/lib/tmpfiles.d/bluegit.conf |
| 13 | install -Dm755 packaging/bluegit-update.sh /usr/lib/bluegit/update |
| 14 | install -Dm644 packaging/bluegit-update.service /usr/lib/systemd/system/bluegit-update.service |
| 15 | install -Dm644 packaging/bluegit-update.rules /usr/share/polkit-1/rules.d/49-bluegit-update.rules |
| 16 | install -Dm644 packaging/storage.conf /usr/share/bluegit/storage.conf.example |
| 17 | if [ ! -f /etc/bluegit/config.yml ]; then |
| 18 | install -Dm640 packaging/bluegit.yml /etc/bluegit/config.yml |
| 19 | fi |
| 20 | systemd-sysusers bluegit.conf || true |
| 21 | systemd-tmpfiles --create bluegit.conf || true |
| 22 | systemctl daemon-reload |
| 23 | echo "Klaar. Vul /etc/bluegit/client_secret." |
| 24 | echo "De database komt in /var/lib/bluegit. Kies de datadisk zelf: kopieer /usr/share/bluegit/storage.conf.example naar /etc/systemd/system/bluegit.service.d/storage.conf en zet ReadWritePaths op die map." |
| 25 | echo "Daarna: systemctl daemon-reload && systemctl enable --now bluegit" |
| 26 | echo "De eerste aanmelding kiest hetzelfde pad in het setup-scherm. Git en CI doen niets tot dat gebeurd is." |