From 6eaeb56a2fd29ff123274d76dda577da9ff43a9f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 15 Oct 2025 18:45:08 +0100 Subject: [PATCH] Add `run` file example --- run-file/run | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 run-file/run diff --git a/run-file/run b/run-file/run new file mode 100755 index 0000000..edf9aed --- /dev/null +++ b/run-file/run @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# https://github.com/adriancooney/Taskfile +# https://nickjanetakis.com/blog/replacing-make-with-a-shell-script-for-running-your-projects-tasks + +set -euo pipefail + +bar() { + echo "Running bar..." +} + +help() { + echo "$0 " + echo "Tasks:" + compgen -A function | grep -v "^_" | cat -n +} + +foo() { + echo "Running foo..." +} + +_hidden() { + echo "This command should be hidden." +} + +TIMEFORMAT="Task completed in %3lR" +time "${@:-help}"