From 474444fa9f0decb2d7734828c7f9d629535dcb94 Mon Sep 17 00:00:00 2001 From: "Mikey Lombardi (He/Him)" Date: Tue, 15 Nov 2022 10:19:33 -0600 Subject: (GH-198) Add `extended` option to hugo feature (#240) Prior to this change, the hugo feature only supported specifying the version of Hugo to install. Hugo is available in two builds: standard, which the feature already installs, and extended, which includes functionality for post-processing CSS/SCSS/SASS and JavaScript. This change adds a new `extended` option to the hugo feature, allowing users to specify that they require the extended build of Hugo. It defaults to `false` and installs the standard build of Hugo. - Resolves #198 --- src/hugo/install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/hugo/install.sh') diff --git a/src/hugo/install.sh b/src/hugo/install.sh index 778b552..c5cb628 100755 --- a/src/hugo/install.sh +++ b/src/hugo/install.sh @@ -106,7 +106,14 @@ if ! hugo version &> /dev/null ; then arch="64bit" fi - hugo_filename="hugo_${VERSION}_Linux-${arch}.tar.gz" + # Install extended version of hugo if desired + if [ "${EXTENDED}" = "true" ]; then + extended="extended_" + else + extended="" + fi + + hugo_filename="hugo_${extended}${VERSION}_Linux-${arch}.tar.gz" curl -fsSLO --compressed "https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${hugo_filename}" tar -xzf "$hugo_filename" -C "$installation_dir" -- cgit v1.2.3