refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / fd / install.sh
index 92621ef41b2e969c3ddf2bdf213a009a295bd6b2..58c7568631559dc86d1a4988f3d1addac8f88f58 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-{
+function __init_fd() {
     set -e
     set -u
 
     WEBI_SINGLE=true
 
     pkg_get_current_version() {
-      # 'fd --version' has output in this format:
-      #       fd 8.1.1
-      # This trims it down to just the version number:
-      #       8.1.1
-      echo $(fd --version 2>/dev/null | head -n 1 | cut -d' ' -f 2)
+        # 'fd --version' has output in this format:
+        #       fd 8.1.1
+        # This trims it down to just the version number:
+        #       8.1.1
+        echo $(fd --version 2> /dev/null | head -n 1 | cut -d' ' -f 2)
     }
 
     pkg_install() {
@@ -29,3 +29,5 @@
         chmod a+x "$pkg_src_cmd"
     }
 }
+
+__init_fd