cli for webinstall.dev
authorAJ ONeal <aj@therootcompany.com>
Mon, 27 Apr 2020 06:24:30 +0000 (06:24 +0000)
committerAJ ONeal <aj@therootcompany.com>
Mon, 27 Apr 2020 06:24:30 +0000 (06:24 +0000)
webi/webi.bash [new file with mode: 0644]

diff --git a/webi/webi.bash b/webi/webi.bash
new file mode 100644 (file)
index 0000000..665f7c6
--- /dev/null
@@ -0,0 +1,19 @@
+#!/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 `curl https://webinstall.dev/PACKAGE_NAME` - just `webi PACKAGE_NAME` instead
+
+set -e
+set -u
+
+my_package=${1:-}
+if [ -z "$my_package" ]; then
+       echo "Usage: webi <package>"
+       echo "Example: webi node"
+       exit 1
+fi
+
+curl -fsSL "https://webinstall.dev/$my_package" | bash