bugfixes
authorAJ ONeal <aj@therootcompany.com>
Mon, 27 Apr 2020 06:29:29 +0000 (06:29 +0000)
committerAJ ONeal <aj@therootcompany.com>
Mon, 27 Apr 2020 06:29:29 +0000 (06:29 +0000)
webi/webi.bash

index 665f7c6fb8e326700ca3da47d2c3e851a6114853..bef84806650fd939a34c8a70f6fe46b0d311b399 100644 (file)
@@ -6,14 +6,17 @@
 # description: |
 #   for the people like us that are too lazy even to run `curl https://webinstall.dev/PACKAGE_NAME` - just `webi PACKAGE_NAME` instead
 
+cat << EOF > ~/.local/bin/webi
 set -e
 set -u
 
-my_package=${1:-}
-if [ -z "$my_package" ]; then
+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
+curl -fsSL "https://webinstall.dev/\$my_package" | bash
+EOF
+chmod a+x ~/.local/bin/webi