From 39b2622f29dba31511f8a86073f4b93600ea9cab Mon Sep 17 00:00:00 2001 From: veeso Date: Wed, 31 Jan 2024 16:53:48 +0100 Subject: [PATCH] fix: script --- tokyo-draft.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tokyo-draft.sh b/tokyo-draft.sh index 672107a..acd4e45 100755 --- a/tokyo-draft.sh +++ b/tokyo-draft.sh @@ -28,7 +28,13 @@ start() { set -a . $ENV set +a - screen -S tokyo-drafter -d -m cargo run -r -- --pidfile $PIDFILE + + CMD="$(which tokyo-draft)" + if [ -z "$CMD" ]; then + CMD="$CARGO run -r -- --pidfile $PIDFILE" + fi + + screen -S tokyo-draft -d -m $CMD return $? }