aboutsummaryrefslogtreecommitdiffstats
path: root/run.sh
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-02-01 20:32:11 +0100
committerDennis Eriksen <d@ennis.no>2023-02-01 20:32:11 +0100
commit8d186d39483beff64a1c11f80c6ca5e56dd7bbc5 (patch)
tree2c5a64ace4bd8eabd4d65014c5313bd7edd76191 /run.sh
parentrun queue in batches (diff)
downloadenergyscripts-8d186d39483beff64a1c11f80c6ca5e56dd7bbc5.tar.gz
moving and renaming/breaking everything
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/run.sh b/run.sh
index 8efffd5..57d3128 100755
--- a/run.sh
+++ b/run.sh
@@ -7,4 +7,13 @@ cd ${0:h}
setopt all_export
source .env
unsetopt all_export
-./venv/bin/python3 $1 || exit 1
+
+if [[ -f $1 ]]; then
+ ./venv/bin/python3 $1
+elif [[ -f scripts/$1 ]]; then
+ ./venv/bin/python3 scripts/$1
+else
+ print -u2 "Computer says no" && exit 1
+fi
+
+exit $?