Skip to content

Instantly share code, notes, and snippets.

@filviu
Created October 11, 2021 09:22
Show Gist options
  • Save filviu/afe108c0e464b5fd91059075ef5f847e to your computer and use it in GitHub Desktop.
Save filviu/afe108c0e464b5fd91059075ef5f847e to your computer and use it in GitHub Desktop.
Install hugo binary
#!/bin/bash
tempdir=$(mktemp -d)
cd $tempdir
curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "browser_download_url.*Linux-64bit.tar.gz"|grep -v extended | cut -d : -f 2,3 | tr -d \" | wget -qi -
tar -xf $(ls -1 *.tar.gz)
mv hugo ~/bin/
cd -
rm -rf $tempdir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment