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