Added code to only add the date to the metadata array if it isn't already present

master
Aadhavan Srinivasan 9 months ago
parent 93fe404571
commit 6701f5389b

@ -58,8 +58,10 @@ convert_to_array() {
}
add_date_to_array() {
meta_array["date"]="$(date -r $1 +'%b %d, %Y')"
if test -z "${meta_array[date]}"; then # If there is no existing date in the metadata
meta_array["date"]="$(date -r $1 +'%b %d, %Y')"
fi
echo "${meta_array[date]}"
}
add_header_and_footer() {

Loading…
Cancel
Save