Created
August 6, 2015 13:22
-
-
Save mlocher/9fea65c570c8f198e831 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install a Hugo on Codeship, https://gohugo.io/ | |
# | |
# You can either add this here, or configure them on the environment tab of your | |
# project settings. | |
HUGO_VERSION="0.14" | |
HUGO_DIR=${HUGO_DIR:="$HOME/hugo"} | |
set -e | |
CACHED_DOWNLOAD="${HOME}/cache/hugo_${HUGO_VERSION}_linux_amd64.tar.gz" | |
mkdir -p "${HUGO_DIR}" | |
wget --continue --output-document "${CACHED_DOWNLOAD}" "https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux_amd64.tar.gz" | |
tar -xaf "${CACHED_DOWNLOAD}" --strip-components=1 --directory "${HUGO_DIR}" | |
ln -s "${HUGO_DIR}/hugo_${HUGO_VERSION}_linux_amd64" "${HOME}/bin/hugo" | |
# check that everything worked | |
hugo version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment