refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / hexyl / install.sh
index 281c6c3399bd633c87f2b5ed7cfd3cb6a8b040e8..74e24364a522ac8bf9c86ba1570ded9a478dc5a8 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-{
+function __init_hexyl() {
     set -e
     set -u
 
     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() {
-        # $HOME/.local/
+        # ~/.local/
         mkdir -p "$pkg_src_bin"
 
-        # mv ./hexyl-*/hexyl "$HOME/.local/opt/hexyl-v0.8.0/bin/hexyl-v0.8.0"
+        # mv ./hexyl-*/hexyl ~/.local/opt/hexyl-v0.8.0/bin/hexyl
         mv ./hexyl-*/hexyl "$pkg_src_cmd"
 
-        # chmod a+x "$HOME/.local/xbin/rg-v11.1.0"
+        # chmod a+x ~/.local/opt/hexyl-v0.8.0/bin/hexyl
         chmod a+x "$pkg_src_cmd"
     }
 }
+
+__init_hexyl