add installers
authorAJ ONeal <aj@therootcompany.com>
Sat, 25 Apr 2020 20:55:17 +0000 (20:55 +0000)
committerAJ ONeal <aj@therootcompany.com>
Sat, 25 Apr 2020 20:55:17 +0000 (20:55 +0000)
node/node.bash [new file with mode: 0644]
pathman/pathman.bash [new file with mode: 0644]
serviceman/serviceman.bash [new file with mode: 0644]

diff --git a/node/node.bash b/node/node.bash
new file mode 100644 (file)
index 0000000..0487caf
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -e
+set -u
+
+curl -fsSL https://git.coolaj86.com/coolaj86/node-installer.sh/raw/branch/master/install.sh -o node-webinstall.sh
+bash node-webinstall.sh
+rm node-webinstall.sh
diff --git a/pathman/pathman.bash b/pathman/pathman.bash
new file mode 100644 (file)
index 0000000..a7ce867
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# title: Pathman
+# tagline: cross-platform PATH management for bash, zsh, fish, cmd.exe, and PowerShell
+# description: |
+#   Works with
+#   - Mac, Windows, Linux
+#   - Bash, Zsh, Fish
+#   - Command, Powershell
+
+set -e
+set -u
+
+# Get arch envs, etc
+my_url="https://rootprojects.org/pathman/dist/$(uname -s)/$(uname -m)/pathman"
+curl -fL "$my_url" -o pathman
+echo ""
+# Make executable
+chmod +x ./pathman
+# Move to ~/.local/bin
+mkdir -p ~/.local/bin
+mv ./pathman ~/.local/bin
+
+# Test if in PATH
+set +e
+my_pathman=$(command -v pathman)
+set -e
+if [ -n "$my_pathman" ]; then
+       if [ "$my_pathman" != "$HOME/.local/bin/pathman" ]; then
+               echo "a pathman installation (which make take precedence) exists at:"
+               echo "    $my_pathman"
+               echo ""
+       fi
+fi
+
+# add to ~/.local/bin to PATH even if pathman is elsewhere
+# TODO pathman needs silent option and debug output (quiet "already exists" output)
+~/.local/bin/pathman add ~/.local/bin # > /dev/null 2> /dev/null
+# TODO inform user to add to path, apart from pathman?
diff --git a/serviceman/serviceman.bash b/serviceman/serviceman.bash
new file mode 100644 (file)
index 0000000..6dd6e07
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# title: Serviceman
+# tagline: cross-platform service management for Linux, Mac, and Windows
+# description: |
+#   Works with
+#   - Launchd (macOS)
+#   - Systemd (Linux)
+#   - Windows Registry
+
+set -e
+set -u
+
+# Get arch envs, etc
+my_url="https://rootprojects.org/serviceman/dist/$(uname -s)/$(uname -m)/serviceman"
+curl -fL "$my_url" -o serviceman
+echo ""
+# Make executable
+chmod +x ./serviceman
+# Move to ~/.local/bin
+mkdir -p ~/.local/bin
+mv ./serviceman ~/.local/bin
+
+# Test if in PATH
+set +e
+my_serviceman=$(command -v serviceman)
+set -e
+if [ -n "$my_serviceman" ]; then
+       if [ "$my_serviceman" != "$HOME/.local/bin/serviceman" ]; then
+               echo "a serviceman installation (which make take precedence) exists at:"
+               echo "    $my_serviceman"
+               echo ""
+       fi
+fi
+
+# add to ~/.local/bin to PATH, just in case
+pathman add ~/.local/bin # > /dev/null 2> /dev/null
+# TODO inform user to add to path, apart from pathman?