Skip to content

Instantly share code, notes, and snippets.

View toryalsip's full-sized avatar
🥑
Where did my mind wander off to?

Tory Alsip toryalsip

🥑
Where did my mind wander off to?
View GitHub Profile
@toryalsip
toryalsip / install-latest-hugo.sh
Last active March 15, 2023 00:51
Download latest hugo
#!/bin/bash
if [ -z $HUGO_VERSION ] ;then
HUGO_VERSION="latest"
API_ENDPOINT="https://api.github.com/repos/gohugoio/hugo/releases/latest"
else
API_ENDPOINT="https://api.github.com/repos/gohugoio/hugo/releases/tags/v$HUGO_VERSION"
fi
HUGO_INSTALL_FILE="/tmp/hugo.deb"
DOWNLOAD_URL=$(curl -s $API_ENDPOINT \
| grep "browser_download_url.*hugo_extended.*_linux-amd64\.deb" \