#!/bin/sh # Installeert BlueGit op Arch zonder makepkg. # Gebruik: sudo packaging/install.sh set -eu root=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd) cd "$root" export CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o bluegit ./cmd/bluegit install -Dm755 bluegit /usr/bin/bluegit install -Dm644 packaging/bluegit.service /usr/lib/systemd/system/bluegit.service install -Dm644 packaging/sysusers.conf /usr/lib/sysusers.d/bluegit.conf install -Dm644 packaging/tmpfiles.conf /usr/lib/tmpfiles.d/bluegit.conf install -Dm644 packaging/storage.conf /usr/share/bluegit/storage.conf.example if [ ! -f /etc/bluegit/config.yml ]; then install -Dm640 packaging/bluegit.yml /etc/bluegit/config.yml fi systemd-sysusers bluegit.conf || true systemd-tmpfiles --create bluegit.conf || true systemctl daemon-reload echo "Klaar. Vul /etc/bluegit/client_secret." echo "Maak de map op de 4 TB-schijf, en kopieer /usr/share/bluegit/storage.conf.example naar /etc/systemd/system/bluegit.service.d/storage.conf (pas het pad aan)." echo "Daarna: systemctl daemon-reload && systemctl enable --now bluegit"