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.
21 Feb 23
26 Nov 22
24 Nov 22
08 Nov 22
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 “$@”
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.
17 Aug 22
28 Jul 22
22 Jun 22
19 May 22
06 May 22
Check download section for wget for how to download an entire website.