From 6c6fd4963784c9e1cad8e7ea806626a0f4020df9 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sun, 29 Jun 2025 15:26:09 -0700 Subject: [PATCH] fix sed expression in bin/new-dir.sh The `bin/new-dir.sh` tool use of `sed(1)` to update the year level Makefile has been fixed. Changed `bin/new-dir.sh` VERSION from "2.0.2 2025-05-29" to "2.0.3 2025-06-29". Tested/testing using potential final round submissions. --- bin/new-dir.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/new-dir.sh b/bin/new-dir.sh index 0b589b8ba..0af6d098f 100755 --- a/bin/new-dir.sh +++ b/bin/new-dir.sh @@ -107,7 +107,7 @@ export LC_ALL="C" # set variables referenced in the usage message # -export VERSION="2.0.2 2025-05-29" +export VERSION="2.0.3 2025-06-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,/^# 1st - DO NOT REMOVE THIS LINE - bin/new-dir.sh 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 '/^# 2nd - DO NOT REMOVE THIS LINE - bin/new-dir.sh uses this line #/,$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