bugfix(vim-shfmt): fix package name
[webi-installers/.git] / hexyl / install.sh
index a4b224d237e49dbd32a71db02f495ccde75f6847..c3037b8d5aad447fa2512b4be526966186925add 100644 (file)
@@ -1,8 +1,8 @@
 #!/bin/bash
+set -e
+set -u
 
-{
-    set -e
-    set -u
+function __init_hexyl() {
 
     ###############
     # Install hexyl #
     WEBI_SINGLE=true
 
     pkg_get_current_version() {
-      # 'hexyl --version' has output in this format:
-      #       hexyl 0.8.0
-      # This trims it down to just the version number:
-      #       0.8.0
-      echo $(hexyl --version 2>/dev/null | head -n 1 | cut -d' ' -f 2)
+        # 'hexyl --version' has output in this format:
+        #       hexyl 0.8.0
+        # This trims it down to just the version number:
+        #       0.8.0
+        echo $(hexyl --version 2> /dev/null | head -n 1 | cut -d' ' -f 2)
     }
 
     pkg_install() {
@@ -29,3 +29,5 @@
         chmod a+x "$pkg_src_cmd"
     }
 }
+
+__init_hexyl