Add user installer and CLI usage instructions
This commit is contained in:
parent
be8749a384
commit
b552ec49cb
1 changed files with 23 additions and 0 deletions
8
install.sh
Executable file
8
install.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/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
|
||||
Loading…
Reference in a new issue