allow multiple installs, show exports last
[webi-installers/.git] / pathman / install.sh
index ba1601a723e910389d1d9f5785a8c2f071d71bd3..9fc604c478268d3f4403a414d8ec142573cd0076 100644 (file)
@@ -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
-#   ```
-#   <br/>
-#
-#   ```bash
-#   pathman remove ~/.local/bin
-#   ```
-#   <br/>
-#
-#   ```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
 }