X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=pathman%2Finstall.sh;fp=pathman%2Finstall.sh;h=9fc604c478268d3f4403a414d8ec142573cd0076;hb=e6a2e1cadc9c3ad7befd86144d11c15eb40a7b4f;hp=ba1601a723e910389d1d9f5785a8c2f071d71bd3;hpb=4adeab6013edd06e3e6be037cf8e7859b4cc8150;p=webi-installers%2F.git diff --git a/pathman/install.sh b/pathman/install.sh index ba1601a..9fc604c 100644 --- a/pathman/install.sh +++ b/pathman/install.sh @@ -1,30 +1,5 @@ #!/bin/bash -# title: Pathman -# homepage: https://git.rootprojects.org/root/pathman -# tagline: | -# Pathman: cross-platform PATH management for bash, zsh, fish, cmd.exe, and PowerShell. -# description: | -# Manages PATH on various OSes and shells -# - Mac, Windows, Linux -# - Bash, Zsh, Fish -# - Command, Powershell -# examples: | -# ```bash -# pathman add ~/.local/bin -# ``` -#
-# -# ```bash -# pathman remove ~/.local/bin -# ``` -#
-# -# ```bash -# pathman list -# ``` - - set -e set -u @@ -35,46 +10,7 @@ pkg_get_current_version() { echo $(pathman version 2>/dev/null | head -n 1 | cut -d ' ' -f2 | sed 's:^v::') } -x_pkg_pre_install() { - # Test if in PATH - set +e - my_pathman=$(command -v pathman) - set -e - if [ -n "$my_pathman" ]; then - # TODO test pathman version - # if [ "$WEBI_VERSION" == "$(pathman version | cut -d ' ' -f2)" ]; then - if [ "$my_pathman" != "$HOME/.local/bin/pathman" ]; then - echo "a pathman installation (which make take precedence) exists at:" - echo " $my_pathman" - echo "" - fi - echo "pathman already installed" - exit 0 - fi -} - -x_pkg_install() { - # TODO use webi_download via releases.js - mkdir -p "$HOME/.local/bin/" - webi_check - webi_download - webi_download - # webi_download "https://rootprojects.org/pathman/dist/$(uname -s)/$(uname -m)/pathman" - mv "$HOME/Downloads/pathman-v0.5.2" "$HOME/.local/bin/pathman" - chmod +x "$HOME/.local/bin/pathman" -} - -x_pkg_link() { - true -} - -pkg_post_install() { - # add to ~/.local/bin to PATH even if pathman is elsewhere - # TODO pathman needs silent option and debug output (quiet "already exists" output) - # TODO inform user to add to path, apart from pathman? - "$HOME/.local/bin/pathman" add "$HOME/.local/bin" -} - pkg_done_message() { + # no message true }