Last active
May 26, 2022 16:43
-
-
Save johnbeynon/ffedf099007f3dde31497ba9be7d31a1 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
hugo version # Output the OLD version | |
if [[ ! -f $XDG_CACHE_HOME/hugo ]]; then | |
echo "...Downloading HUGO" | |
mkdir -p ~/tmp | |
wget -P ~/tmp https://github.com/gohugoio/hugo/releases/download/v0.99.1/hugo_0.99.1_Linux-32bit.tar.gz | |
cd ~/tmp | |
echo "...Extracting HUGO" | |
tar -xzvf hugo_0.99.1_Linux-32bit.tar.gz | |
echo "...Moving HUGO" | |
mv hugo $XDG_CACHE_HOME/hugo | |
cd $HOME/project/src # Make sure we return to where we were | |
else | |
echo "...Using HUGO from build cache" | |
fi | |
$XDG_CACHE_HOME/hugo version # Output the NEW version | |
$XDG_CACHE_HOME/hugo --gc --minify |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment