Added code to only add the date to the metadata array if it isn't already present
This commit is contained in:
6
build.sh
6
build.sh
@@ -58,8 +58,10 @@ convert_to_array() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_date_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() {
|
add_header_and_footer() {
|
||||||
|
Reference in New Issue
Block a user