Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions .justfiles/build.just
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ install:
fi
echo "installed ${dest}/cans"

# Remove go-installed / brew / ./bin cans, plus leftover uv venv.
# Remove every cans install: go/brew bins, ./bin, and ~/.cans.
uninstall:
#!/usr/bin/env bash
set -euo pipefail
Expand All @@ -44,20 +44,10 @@ uninstall:
brew uninstall --formula --force cans
fi
home="${CANS_HOME:-$HOME/.cans}"
if [ -d "${home}/venv" ]; then
rm -rf "${home}/venv"
echo "removed ${home}/venv"
if [ -e "$home" ]; then
rm -rf "$home"
echo "removed ${home}"
fi
echo "keep/shipped still in ${home} — just uninstall-home"

# Remove ~/.cans (keep, shipped, native, venv).
uninstall-home:
#!/usr/bin/env bash
set -euo pipefail
home="${CANS_HOME:-$HOME/.cans}"
if [ ! -e "$home" ]; then
echo "no ${home}"
exit 0
fi
rm -rf "$home"
echo "removed ${home}"
just uninstall
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ cd cans
just install
```

`just install` (same as `just run install`) is `go install` into `$(go env GOBIN)`, or `$(go env GOPATH)/bin` if GOBIN is empty. `cans doctor` fetches the mouth. `just uninstall` removes the binary and leftover `~/.cans/venv`. `just uninstall-home` removes `~/.cans`.
`just install` (same as `just run install`) is `go install` into `$(go env GOBIN)`, or `$(go env GOPATH)/bin` if GOBIN is empty. `cans doctor` fetches the mouth. `just uninstall` removes the binary, brew formula, and `~/.cans`.

</details>

Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ mod dist '.justfiles/dist.just'
install:
just build install

[doc('remove installed cans binaries and leftover uv venv')]
[doc('remove cans binaries, brew formula, and ~/.cans')]
uninstall:
just build uninstall

[doc('remove ~/.cans state')]
[doc('same as uninstall')]
uninstall-home:
just build uninstall-home
just uninstall

[private]
default:
Expand Down
Loading