refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / hugo / install.sh
index 04bc4f772e147a943905562f4357ca3fa7425e3c..1ef628415715a02e35a7715a8264e955c66f8420 100644 (file)
@@ -1,13 +1,14 @@
+#!/bin/bash
 set -e
 set -u
 
 pkg_cmd_name="hugo"
 WEBI_SINGLE=true
 
-pkg_get_current_version() {
+function pkg_get_current_version() {
     # 'hugo version' has output in this format:
     #       Hugo Static Site Generator v0.72.0-8A7EF3CF darwin/amd64 BuildDate: 2020-05-31T12:07:44Z
     # This trims it down to just the version number:
     #       0.72.0
-    echo "$(hugo version 2>/dev/null | head -n 1 | cut -d' ' -f5 | cut -d '-' -f1 | sed 's:^v::')"
+    echo "$(hugo version 2> /dev/null | head -n 1 | cut -d' ' -f5 | cut -d '-' -f1 | sed 's:^v::')"
 }