From 2bf37e482f73d4b58ff7e2b2d0baf91a7beede01 Mon Sep 17 00:00:00 2001 From: Ayo Date: Sat, 21 Jun 2025 18:58:47 +0200 Subject: [PATCH] fix(journal): install cannot find directory because of space in full path --- README.md | 4 ++-- ayo.sh | 4 +++- journal.sh | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 164e712..d2d4ffc 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ $ git clone git@git.sr.ht:~ayoayco/scripts 2. Copy config and populate ```bash -$ cp example.config .config -$ vim .config +$ cp example.config ~/.ayo.config +$ vim ~/.ayo.config ``` 3. update your .bashrc to add an alias for the parent command `scripts/ayo.sh` diff --git a/ayo.sh b/ayo.sh index 6308604..70c19e6 100755 --- a/ayo.sh +++ b/ayo.sh @@ -1,3 +1,5 @@ #! /usr/bin/bash -echo "Hello Ayo!" +echo '>>> running' $1 + +. ${HOME}/Projects/scripts/$1.sh $2 $3 $4 $5 diff --git a/journal.sh b/journal.sh index 84e2fc4..9cc355b 100755 --- a/journal.sh +++ b/journal.sh @@ -1,7 +1,7 @@ #! /usr/bin/bash # Load config -. ./.config +. ${HOME}/.ayo.config journal_dir="${notes_dir}/Journal" month_dir=$(date +"%m %b") @@ -10,7 +10,7 @@ full_path="${journal_dir}/${month_dir}/${file_name}" # IF Not Exists: create file & echo date if ! test -f "$full_path"; then - install -Dv /dev/null $full_path + install -Dv /dev/null "$full_path" # TODO: update to correct heading from old entries # Jun 17, 2025, Tue 10:24 PM heading=$(date +'%b %d, %Y, %a %r')