improve new_entry rule in Makefile.year for bin/new-dir.sh

We fix/improve the new_entry rule in `template/Makefile.year`
that is used by `bin/new-dir.sh`.

Changed `bin/new-dir.sh` VERSION from "2.0.1 2025-05-18"
to "2.0.2 2025-05-29".

Tested/testing using potential final round submissions.
This commit is contained in:
Landon Curt Noll committed 2025-06-29 14:24:31 -07:00
1 parent b3f3928867
commit 9ef2799ad1
2 files changed
+28 -9

No files matched your search

+3 -3
View File
@@ -107,7 +107,7 @@ export LC_ALL="C"
# set variables referenced in the usage message
#
export VERSION="2.0.1 2025-05-18"
export VERSION="2.0.2 2025-05-29"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -478,7 +478,7 @@ fi
if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: forming temporary Makefile: $TMP_MAKEFILE" 1>&2
fi
sed -n -e '1,/^# BEGIN - DO NOT REMOVE THIS LINE - make new_entry uses this line #/p' "$MAKE_FILE" > "$TMP_MAKEFILE"
sed -n -e '1,/^# 1st - DO NOT REMOVE THIS LINE - bin/new-dir.sh uses this line #/p' "$MAKE_FILE" > "$TMP_MAKEFILE"
make -C "$YEAR_DIR" new_entry NEW_ENTRY="$ENTRY_DIR" >> "$TMP_MAKEFILE"
status="$?"
if [[ $status -ne 0 ]]; then
@@ -486,7 +486,7 @@ if [[ $status -ne 0 ]]; then
"error code: $status" 1>&2
exit 15
fi
sed -n -e '/^# END - DO NOT REMOVE THIS LINE - make new_entry also uses this #/,$p' "$MAKE_FILE" >> "$TMP_MAKEFILE"
sed -n -e '/^# 2nd - DO NOT REMOVE THIS LINE - bin/new-dir.sh uses this line #/,$p' "$MAKE_FILE" >> "$TMP_MAKEFILE"
# Update Makefile if is changes and not -n