Useful zsh and bash scripts
In the case of scripts which operate as utilities, use the --help switch to learn how to make use of the tool. Scripts which are intended to be run once — for example, the Raspberry Pi setup scripts — are documented in comments. Scripts run in other contexts, eg. in Xcode, are not yet documented.
Output man pages to text files. Specify the page and its output text file as pairs of arguments.
Image processing scripts. See this blog post.
Note imageprep 5.2.0 reverses the order of crop, scale and pad dimensions from to .
Confirm or reject a downloaded file’s SHA-256.
Convert the working directory’s file extensions to lowercase.
Converts .docx files downloaded from Google Docs to .pdf.
Scans a folder (and sub-folders) for .cbz files and converts them to .pdf files. Created for a one-off project. Included here to record folder scanning and file manipulation algorithms.
macOS/watchOS/iOS app icon maker script.
Xcode-oriented build script for auto-incrementing a project's build number at build time.
Shell scripts to automate the creation of macOS app installer packages, and their signing and notarization. For use with apps distributed outside the Mac App Store.
Update local config files from the dotfiles repo.
Set up a new Mac.
Local media back-up scripts, targeting disk and server.
Update local config files from the dotfiles repo.
Setup scripts for the Raspberry Pi and the Raspberry Pi Zero.
SD card preparation script for Raspberry Pis. Note This runs on a macOS host.
Hack a Raspberry Pi to run in read-only mode (no writes to the SD).
Copy a bunch of Python files to a CircuitPython device. The first file on the list is renamed code.py.