Files
music_library/scripts/_helpers.sh
T
Claudio Ortolina 71cfb2e0e7 Fix shell helpers
- Use alternative function format to make shellcheck happy
- specify bash as an interpreter
2025-10-08 00:43:37 +03:00

11 lines
230 B
Bash

#!/usr/bin/env bash
function ensure_working_directory! {
root_dir="$(git rev-parse --show-toplevel)"
if [[ "$PWD" != "$root_dir" ]]; then
echo "Please run the script from the root of the repo: $root_dir"
exit
fi
}