04 Mar 23

I eventually developed an extremely crude shell script that automated at least a little bit of that.

But the other thing that kept happening is that I would need to run different release versions of Zig in addition to the dev build. (Some Zig software authors wisely pick a release version for their applications. So you need to use those release versions to build that application.)

So now I’ve got two scripts:

zignew extracts a new Zig build tarball and updates my symlink.

zigswitch uses fuzzy matching (so cool!) to let me pick from a menu of installed Zig versions and updates the symlink.

by eli 2 years ago
Tags:

27 Oct 22

#!/usr/bin/env bash

set -o errexit set -o nounset set -o pipefail if [[ “${TRACE-0}” == “1” ]]; then

set -o xtrace

fi

if [[ “${1-}” =~ ^-*h(elp)?$ ]]; then

echo 'Usage: ./script.sh arg-one arg-two

This is an awesome bash script to make your life better.

exit

fi

cd “$(dirname “$0”)”

main() {

echo do awesome stuff

}

main “$@”

by eli 3 years ago saved 4 times

This article is about a few quick thumb rules I use when writing shell scripts that I’ve come to appreciate over the years. Very opinionated.

by lamnatos 3 years ago saved 4 times

06 May 22

Check download section for wget for how to download an entire website.

by bbohling 3 years ago saved 2 times