fix(journal): install cannot find directory because of space in full path

This commit is contained in:
Ayo Ayco 2025-06-21 18:58:47 +02:00
parent e2e7806f35
commit 2bf37e482f
3 changed files with 7 additions and 5 deletions

View file

@ -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`

4
ayo.sh
View file

@ -1,3 +1,5 @@
#! /usr/bin/bash
echo "Hello Ayo!"
echo '>>> running' $1
. ${HOME}/Projects/scripts/$1.sh $2 $3 $4 $5

View file

@ -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')