From 22dde8c213fd2bd55987df86061ca08a5529f90d Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Thu, 1 Jan 2026 17:35:56 -0600 Subject: [PATCH] Add wrapper script for master program --- TODO.md | 6 +++++- master/.gitignore | 2 +- master/go.mod | 2 +- master/master | 8 ++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100755 master/master diff --git a/TODO.md b/TODO.md index cd150a3..077092e 100644 --- a/TODO.md +++ b/TODO.md @@ -16,9 +16,13 @@ - Should have sane defaults - Adding new arguments should be easy and obvious -- [ ] Add wrapper script to run main program (so that various assumptions related +- [x] Add wrapper script to run master program (so that various assumptions related to relative paths are safer) +- [ ] move `master-bin` into a subdir like `master/cmd` or whatever is + idiomatic for golang programs; adapt `master` wrapper shell script + accordingly + - [ ] Add unit tests all over the place. - ⚠️ Huge task - needs breakdown before starting diff --git a/master/.gitignore b/master/.gitignore index 1f7391f..824c87f 100644 --- a/master/.gitignore +++ b/master/.gitignore @@ -1 +1 @@ -master +master-bin diff --git a/master/go.mod b/master/go.mod index bcee3cf..b94b98f 100644 --- a/master/go.mod +++ b/master/go.mod @@ -1,4 +1,4 @@ -module philologue.net/diachron/master +module philologue.net/diachron/master-bin go 1.23.3 diff --git a/master/master b/master/master new file mode 100755 index 0000000..94b3e1a --- /dev/null +++ b/master/master @@ -0,0 +1,8 @@ +#!/bin/bash + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +cd "$DIR" + +./master-bin "$@" +