From 7f342188d57a6581d54d4dcecb14587270fca5a6 Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Sat, 17 Feb 2024 17:15:39 +0200 Subject: [PATCH] allow writer.sh to pass publish_dir override to noter.sh --- writer.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/writer.sh b/writer.sh index b86274a..40befea 100755 --- a/writer.sh +++ b/writer.sh @@ -15,4 +15,7 @@ current_date=$(date +%Y-%m-%d) nlog "opening note notes/$current_time.txt" filename="notes/${current_date}.txt" $EDITOR "$filename" -./noter.sh + +# Override publish dir if passed as cli arg +[[ ! -z "$1" ]] && publish_dir="$1" +./noter.sh "${publish_dir}"