if md5sum -c "$BINARY_NAME-linux-amd64.md5" 2>/dev/null; then echo "MD5 OK" else echo "MD5 FAILED" return 1 fi
brew install wget --binary
Make sure to replace downloader.py with the name you save your script as, and adjust the arguments according to your needs. This example assumes you have requests installed; if not, you can install it with pip: download one binary buildver hometarmd5 work
Turn the process into a reusable bash function fitting buildver and home : if md5sum -c "$BINARY_NAME-linux-amd64
From Hugo releases page: buildver = 0.128.0 , binary = hugo_extended_0.128.0_linux-amd64.tar.gz + .md5 . if md5sum -c "$BINARY_NAME-linux-amd64.md5" 2>
import argparse import hashlib import os import requests