still fixing WSL
[webi-installers/.git] / _webi / bootstrap.sh
index 7bf24e76bf90ac43a548b438f38628aad28f3fe6..877ad818443500feccc80ab79a49eeebac4cfba7 100644 (file)
@@ -52,9 +52,9 @@ if [ -n "\$(command -v unxz)" ]; then
 fi
 if [ -n "\$(command -v unzip)" ]; then
     my_ext="zip,\$my_ext"
-else
-    echo "WARN: 'unzip' not found"
 fi
+# for mac/linux 'exe' refers to the uncompressed binary without extension
+my_ext="exe,\$my_ext"
 if [ -n "\$(command -v tar)" ]; then
     my_ext="tar,\$my_ext"
 fi
@@ -79,8 +79,8 @@ webinstall() {
 
     my_package="\${1:-}"
     if [ -z "\$my_package" ]; then
-        echo "Usage: webi <package>@<version> ..."
-        echo "Example: webi node@lts rg"
+        >&2 echo "Usage: webi <package>@<version> ..."
+        >&2 echo "Example: webi node@lts rg"
         exit 1
     fi
 
@@ -96,7 +96,7 @@ webinstall() {
             -O "\$WEBI_BOOT/\$my_package-bootstrap.sh"
     fi
     if ! [ \$? -eq 0 ]; then
-      echo "error fetching '\$my_installer_url'"
+      >&2 echo "error fetching '\$my_installer_url'"
       exit 1
     fi
     set -e