8 lines
376 B
Shell
8 lines
376 B
Shell
|
|
#!/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
|