From 0c4ade9fb783f16d46cb268fe23974435c8f4168 Mon Sep 17 00:00:00 2001 From: Ryan Greenup Date: Sat, 25 Jul 2020 11:59:28 +1000 Subject: [PATCH] idea for config search --- bin/00TODOConfig.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bin/00TODOConfig.sh diff --git a/bin/00TODOConfig.sh b/bin/00TODOConfig.sh new file mode 100644 index 0000000..9739c59 --- /dev/null +++ b/bin/00TODOConfig.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -euo pipefail + +conlook () { + if [[ -f ./.config.json ]]; then + CONFIG="./config.json" + return + elif [[ CONFIG == "" ]] + if [[ "$(pwd)" == "/" ]]; then + CONFIG="~/.config/cadmus/config.json" + else + cd .. + fi + conlook +}