4 # homepage: https://git.rootprojects.org/root/pathman
5 # tagline: cross-platform PATH management for bash, zsh, fish, cmd.exe, and PowerShell
7 # Manages PATH on various OSes and shells
8 # - Mac, Windows, Linux
10 # - Command, Powershell
13 # pathman add ~/.local/bin
18 # pathman remove ~/.local/bin
32 my_pathman=$(command -v pathman)
34 if [ -n "$my_pathman" ]; then
35 # TODO test pathman version
36 # if [ "$WEBI_VERSION" == "$(pathman version | cut -d ' ' -f2)" ]; then
37 if [ "$my_pathman" != "$HOME/.local/bin/pathman" ]; then
38 echo "a pathman installation (which make take precedence) exists at:"
42 echo "pathman already installed"
46 # TODO use webi_download via releases.js
47 webi_download "https://rootprojects.org/pathman/dist/$(uname -s)/$(uname -m)/pathman" "$HOME/.local/bin/pathman"
49 # TODO use webi_extract
50 chmod +x "$HOME/.local/bin/pathman"
52 # add to ~/.local/bin to PATH even if pathman is elsewhere
53 # TODO pathman needs silent option and debug output (quiet "already exists" output)
54 "$HOME/.local/bin/pathman" add ~/.local/bin # > /dev/null 2> /dev/null
55 # TODO inform user to add to path, apart from pathman?