dnote/pkg/cli/scripts/dev.sh
Sung Won Cho 6feda8c392
Allow to customize endpoint in CLI (#213)
* Read api endpoint from config

* Migrate config file
2019-06-28 15:38:59 +10:00

10 lines
362 B
Bash
Executable file

#!/bin/bash
# dev.sh builds a new binary and replaces the old one in the PATH with it
set -eux
sudo rm -rf "$(which dnote)" "$GOPATH/bin/cli"
# change tags to darwin if on macos
go install -ldflags "-X main.apiEndpoint=http://127.0.0.1:5000" --tags "linux fts5" "$GOPATH/src/github.com/dnote/dnote/pkg/cli/."
sudo ln -s "$GOPATH/bin/cli" /usr/local/bin/dnote