fix(journal): install cannot find directory because of space in full path
This commit is contained in:
parent
e2e7806f35
commit
2bf37e482f
3 changed files with 7 additions and 5 deletions
|
@ -10,8 +10,8 @@ $ git clone git@git.sr.ht:~ayoayco/scripts
|
||||||
|
|
||||||
2. Copy config and populate
|
2. Copy config and populate
|
||||||
```bash
|
```bash
|
||||||
$ cp example.config .config
|
$ cp example.config ~/.ayo.config
|
||||||
$ vim .config
|
$ vim ~/.ayo.config
|
||||||
```
|
```
|
||||||
|
|
||||||
3. update your .bashrc to add an alias for the parent command `scripts/ayo.sh`
|
3. update your .bashrc to add an alias for the parent command `scripts/ayo.sh`
|
||||||
|
|
4
ayo.sh
4
ayo.sh
|
@ -1,3 +1,5 @@
|
||||||
#! /usr/bin/bash
|
#! /usr/bin/bash
|
||||||
|
|
||||||
echo "Hello Ayo!"
|
echo '>>> running' $1
|
||||||
|
|
||||||
|
. ${HOME}/Projects/scripts/$1.sh $2 $3 $4 $5
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#! /usr/bin/bash
|
#! /usr/bin/bash
|
||||||
|
|
||||||
# Load config
|
# Load config
|
||||||
. ./.config
|
. ${HOME}/.ayo.config
|
||||||
|
|
||||||
journal_dir="${notes_dir}/Journal"
|
journal_dir="${notes_dir}/Journal"
|
||||||
month_dir=$(date +"%m %b")
|
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 Not Exists: create file & echo date
|
||||||
if ! test -f "$full_path"; then
|
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
|
# TODO: update to correct heading from old entries
|
||||||
# Jun 17, 2025, Tue 10:24 PM
|
# Jun 17, 2025, Tue 10:24 PM
|
||||||
heading=$(date +'%b %d, %Y, %a %r')
|
heading=$(date +'%b %d, %Y, %a %r')
|
||||||
|
|
Loading…
Reference in a new issue