chimney (nix old logs)
[webi-installers/.git] / webi / webi.bash
index a89f961b452a741269b697d8691e2d216f16e6de..d32a61066dfbe5774dff445ace8a4e8039fa572e 100644 (file)
@@ -4,21 +4,24 @@
 # homepage: https://webinstall.dev
 # tagline: webinstall.dev for the CLI
 # description: |
-#   for the people like us that are too lazy even to run `curl https://webinstall.dev/PACKAGE_NAME` - just `webi PACKAGE_NAME` instead
+#   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
+#   ```
 
-# TODO webi package@semver#channel
-
-cat << EOF > ~/.local/bin/webi
-set -e
-set -u
-
-my_package=\${1:-}
-if [ -z "\$my_package" ]; then
-       echo "Usage: webi <package>"
-       echo "Example: webi node"
-       exit 1
+if [ -f "$HOME/.local/bin/webi" ]; then
+  echo "Installed 'webi'"
+else
+  echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process"
 fi
-
-curl -fsSL "https://webinstall.dev/\$my_package" | bash
-EOF
-chmod a+x ~/.local/bin/webi