refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / webi / install.sh
index c5730b2a6a18bf422c65f820b8745b406db1db98..8df8d86b36a782f74a815401323f6d52cbf57ada 100644 (file)
@@ -1,38 +1,31 @@
 #!/bin/bash
 
-# title: Webi
-# homepage: https://webinstall.dev
-# tagline: webinstall.dev for the CLI
-# description: |
-#   for the people like us that are too lazy even to run <kbd>curl&nbsp;https://webinstall.dev/PACKAGE_NAME&nbsp;|&nbsp;bash</kbd>
-# examples: |
-#   ```bash
-#   webi node@latest
-#   ```
-#   <br/>
-#
-#   ```bash
-#   webi golang@v1.14
-#   ```
-#   <br/>
-#
-#   ```bash
-#   webi rustlang
-#   ```
+# Note: 'webi' is a special case. It's actually just a helper utility that comes with every installer.
+#       See https://github.com/webinstall/packages/blob/master/_webi/bootstrap.sh for the source.
 
-{
+function __faux_webi() {
 
-if [ -f "$HOME/.local/bin/webi" ]; then
-  set +e
-  cur_webi="$(command -v webi)"
-  set -e
-  if [ -z "$cur_webi" ]; then
-    webi_path_add "$HOME/.local/bin"
-  fi
-  echo "Installed 'webi'"
-else
-  # for when this file is run on its own, not from webinstall.dev
-  echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process"
-fi
+    if [ -f "$HOME/.local/bin/webi" ]; then
+        set +e
+        cur_webi="$(command -v webi)"
+        set -e
+        if [ -z "$cur_webi" ]; then
+            webi_path_add "$HOME/.local/bin"
+        fi
+    else
+        # for when this file is run on its own, not from webinstall.dev
+        echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process"
+    fi
 
+    echo ""
+    echo "'webi' installed to ~/.local/bin/webi"
+    echo ""
+    echo "Usage:"
+    echo "    webi <package-name>[@version] ..."
+    echo ""
+    echo "Example:"
+    echo "    webi node@lts prettier vim-essentials"
+    echo ""
 }
+
+__faux_webi