chore(style): add shebang, set bash strict mode, create function
[webi-installers/.git] / curlie / install.sh
index ab6f30069b5768d473a27c5ad4d86207474f26db..ec5bcd9431de94e193e583ecdf30064d543a959f 100644 (file)
@@ -1,8 +1,8 @@
 #!/bin/bash
+set -e
+set -u
 
-{
-    set -e
-    set -u
+function __init_curlie() {
 
     ##################
     # Install curlie #
     WEBI_SINGLE=true
 
     pkg_get_current_version() {
-      # 'curlie --version' has output in this format:
-      #       TODO
-      # This trims it down to just the version number:
-      #       TODO
-      #echo $(curlie --version 2>/dev/null | head -n 1 | cut -d' ' -f 2)
-      # See https://github.com/rs/curlie/issues/22
-      echo "0.0.0"
+        # 'curlie --version' has output in this format:
+        #       TODO
+        # This trims it down to just the version number:
+        #       TODO
+        #echo $(curlie --version 2>/dev/null | head -n 1 | cut -d' ' -f 2)
+        # See https://github.com/rs/curlie/issues/22
+        echo "0.0.0"
     }
 
     pkg_install() {
@@ -31,3 +31,5 @@
         chmod a+x "$pkg_src_cmd"
     }
 }
+
+__init_curlie