Adding noter_dir to be able to use noter to generate multiple sites
This commit is contained in:
parent
7f342188d5
commit
5ec3c6130c
3
noter.sh
3
noter.sh
|
@ -11,7 +11,8 @@ nlog() {
|
|||
}
|
||||
|
||||
nlog "sourcing config.sh"
|
||||
source ./config.sh
|
||||
noter_dir=$(dirname "$0")
|
||||
source $noter_dir/config.sh
|
||||
|
||||
# Override publish dir if passed as cli arg
|
||||
[[ ! -z "$1" ]] && nlog "overriding publish_dir to $1" && publish_dir="$1"
|
||||
|
|
|
@ -16,6 +16,9 @@ nlog "opening note notes/$current_time.txt"
|
|||
filename="notes/${current_date}.txt"
|
||||
$EDITOR "$filename"
|
||||
|
||||
# Get writer's location in case executed elsewhere
|
||||
noter_dir=$(dirname "$0")
|
||||
|
||||
# Override publish dir if passed as cli arg
|
||||
[[ ! -z "$1" ]] && publish_dir="$1"
|
||||
./noter.sh "${publish_dir}"
|
||||
"$noter_dir/noter.sh" "${publish_dir}"
|
||||
|
|
Loading…
Reference in New Issue