Had to update path-names to allow scripts to access the files after update to journals.sh
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/opt/homebrew/bin/bash
|
||||
: "
|
||||
get_task_number
|
||||
This function will query sqlite db to either get the number of a task OR create the task and return the number
|
||||
|
@@ -1,8 +1,18 @@
|
||||
#!/usr/bin/bash
|
||||
#!/opt/homebrew/bin/bash
|
||||
|
||||
|
||||
function get_journals () {
|
||||
local JOURNAL_REGEX='[0-9]{4}-[0-9]{2}-[0-9]{2}.wiki'
|
||||
[[ "$1" ]] && declare -n hashmap="$1"
|
||||
hashmap=( $( ls $JOURNAL_DIR -1 | grep -Eo $JOURNAL_REGEX | sort -n ) )
|
||||
declare -n array="${1:?"get_journals : Variable not passed through"}"
|
||||
array=( $( ls -1 $JOURNAL_DIR | grep -Eo $JOURNAL_REGEX | sort -n ) )
|
||||
|
||||
local file
|
||||
for i in ${!array[@]}; do
|
||||
file="${array[$i]}"
|
||||
DIR=`basename $JOURNAL_DIR`
|
||||
if [[ "$file" != $DIR/* ]]; then
|
||||
file="/$DIR/$file"
|
||||
array[$i]=$file
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
[[ -f ~/Journal/utils/journals.sh ]] && . ~/Journal/utils/journals.sh
|
||||
#!/opt/homebrew/bin/bash
|
||||
[[ -f ~/Notes/utils/journals.sh ]] && . ~/Notes/utils/journals.sh
|
||||
|
||||
function get_tasks () {
|
||||
set -x
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
[[ -f ~/Journal/utils/journals.sh ]] && . ~/Journal/utils/journals.sh
|
||||
#!/opt/homebrew/bin/bash
|
||||
[[ -f ~/Notes/utils/journals.sh ]] && . ~/Notes/utils/journals.sh
|
||||
|
||||
function get_tasks () {
|
||||
local -a journals
|
||||
|
Reference in New Issue
Block a user