chultun/install.sh

8 lines
376 B
Shell
Raw Normal View History

#!/bin/sh
set -eu
cd -- "$(dirname -- "$0")"
CGO_ENABLED=0 go build -trimpath -o bin/budget ./cmd/budget
install -Dm755 bin/budget "$HOME/.local/bin/.budget.new"
mv "$HOME/.local/bin/.budget.new" "$HOME/.local/bin/budget"
test -f "$HOME/.config/budget/profiles.toml" || install -Dm644 profiles.example.toml "$HOME/.config/budget/profiles.toml"
"$HOME/.local/bin/budget" apply