#!/bin/sh usage () { echo "usage: $0 tag" exit 1 } [ -n "$1" ] && tag="$1" || usage file="simh-3.9-0.tgz" url="https://codeload.github.com/simh/simh/tar.gz/refs/tags/v3.9-0" cd "$(dirname $0)" [ -f "$file" ] || wget "$url" -O "$file" docker build -t "$tag" .