Update header of guidelines.md and rules.md based on status.json
In a few cases, the error message related to a file or directory test was corrected. Changed `bin/gen-sitemap.sh` VERSION from "1.3.6 2024-04-13" to "1.3.7 2024-04-14". Changed `bin/gen-year-index.sh` VERSION from "1.0.6 2024-04-13" to "1.0.7 2024-04-14". Changed `bin/untar-year.sh` VERSION from "1.0.1 2024-04-13" to "1.0.2 2024-04-14". Updated `bin/gen-status.sh` to change the header of `next/guidelines.md` and `next/rules.md` to match the _contest_status_ in `status.json`. Moved `make gen_top_html` after `make gen_status` in `make www` and in `make quick_www` rules in the top Makefile. Changed `bin/gen-status.sh` VERSION from "1.2.1 2024-04-13" to "1.3 2024-04-14". Fixed the DESCRIPTION for `next/guidelines.html`. Run `make www` to perform the above and test under macOS.
This commit is contained in:
1 parent
6a67018538
commit
eb52e94bf9
20 files changed
+535
-43
No files matched your search
@@ -266,10 +266,10 @@ help:
|
||||
@echo make gen_location
|
||||
@echo make gen_years
|
||||
@echo make entry_index
|
||||
@echo make gen_top_html
|
||||
@echo make gen_other_html
|
||||
@echo make gen_year_index
|
||||
@echo make gen_status
|
||||
@echo make gen_top_html
|
||||
@echo make quick_entry_index
|
||||
@echo make quick_www
|
||||
@echo make www
|
||||
@@ -434,9 +434,9 @@ quick_www:
|
||||
${MAKE} gen_location
|
||||
${MAKE} gen_years
|
||||
${MAKE} gen_year_index
|
||||
${MAKE} gen_top_html
|
||||
${MAKE} gen_other_html
|
||||
${MAKE} gen_status
|
||||
${MAKE} gen_top_html
|
||||
${MAKE} quick_entry_index
|
||||
${MAKE} gen_sitemap
|
||||
@echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-='
|
||||
@@ -456,9 +456,9 @@ www:
|
||||
${MAKE} gen_location
|
||||
${MAKE} gen_years
|
||||
${MAKE} gen_year_index
|
||||
${MAKE} gen_top_html
|
||||
${MAKE} gen_other_html
|
||||
${MAKE} gen_status
|
||||
${MAKE} gen_top_html
|
||||
${MAKE} entry_index
|
||||
${MAKE} gen_sitemap
|
||||
@echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-='
|
||||
|
||||
+2
-2
@@ -84,7 +84,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
||||
|
||||
# set variables referenced in the usage message
|
||||
#
|
||||
export VERSION="1.3.6 2024-04-13"
|
||||
export VERSION="1.3.7 2024-04-14"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -357,7 +357,7 @@ export BIN_DIR="bin"
|
||||
#
|
||||
export INC_PATH="$TOPDIR/inc"
|
||||
if [[ ! -d $INC_PATH ]]; then
|
||||
echo "$0: ERROR: inc is not a directory under topdir: $BIN_PATH" 1>&2
|
||||
echo "$0: ERROR: inc is not a directory under topdir: $INC_PATH" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
export INC_DIR="inc"
|
||||
|
||||
+322
-18
@@ -84,7 +84,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
||||
|
||||
# set variables referenced in the usage message
|
||||
#
|
||||
export VERSION="1.2.1 2024-04-13"
|
||||
export VERSION="1.3 2024-04-14"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -579,11 +579,11 @@ if [[ ! -f $NEWS_MD ]]; then
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -r $NEWS_MD ]]; then
|
||||
echo "$0: ERROR: news.md is not an executable file: $NEWS_MD" 1>&2
|
||||
echo "$0: ERROR: news.md is not an readable file: $NEWS_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -s $NEWS_MD ]]; then
|
||||
echo "$0: ERROR: news.md is not an executable file: $NEWS_MD" 1>&2
|
||||
echo "$0: ERROR: news.md is not an non-empty readable file: $NEWS_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -599,11 +599,11 @@ if [[ ! -f $STATUS_JSON ]]; then
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -r $STATUS_JSON ]]; then
|
||||
echo "$0: ERROR: status.json is not an executable file: $STATUS_JSON" 1>&2
|
||||
echo "$0: ERROR: status.json is not an readable file: $STATUS_JSON" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -s $STATUS_JSON ]]; then
|
||||
echo "$0: ERROR: status.json is not an executable file: $STATUS_JSON" 1>&2
|
||||
echo "$0: ERROR: status.json is not an non-empty readable file: $STATUS_JSON" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -619,11 +619,11 @@ if [[ ! -f $STATUS_MD ]]; then
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -r $STATUS_MD ]]; then
|
||||
echo "$0: ERROR: status.md is not an executable file: $STATUS_MD" 1>&2
|
||||
echo "$0: ERROR: status.md is not an readable file: $STATUS_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -s $STATUS_MD ]]; then
|
||||
echo "$0: ERROR: status.md is not an executable file: $STATUS_MD" 1>&2
|
||||
echo "$0: ERROR: status.md is not an non-empty readable file: $STATUS_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -651,6 +651,24 @@ if [[ ! -s $TOP_FILE ]]; then
|
||||
exit 6
|
||||
fi
|
||||
|
||||
# verify that we have an inc subdirectory
|
||||
#
|
||||
export INC_PATH="$TOPDIR/inc"
|
||||
if [[ ! -d $INC_PATH ]]; then
|
||||
echo "$0: ERROR: inc is not a directory under topdir: $INC_PATH" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
export INC_DIR="inc"
|
||||
|
||||
# verify that we have an next subdirectory
|
||||
#
|
||||
export NEXT_PATH="$TOPDIR/next"
|
||||
if [[ ! -d $NEXT_PATH ]]; then
|
||||
echo "$0: ERROR: next is not a directory under topdir: $NEXT_PATH" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
export NEXT_DIR="next"
|
||||
|
||||
# determine how we can determine the file modification time in W3C Datetime format:
|
||||
#
|
||||
# https://www.w3.org/TR/NOTE-datetime
|
||||
@@ -746,6 +764,10 @@ if [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: STATUS_MD=$STATUS_MD" 1>&2
|
||||
echo "$0: debug[3]: STATUS_HTML=$STATUS_HTML" 1>&2
|
||||
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
||||
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
||||
echo "$0: debug[3]: INC_DIR=$INC_DIR" 1>&2
|
||||
echo "$0: debug[3]: NEXT_PATH=$NEXT_PATH" 1>&2
|
||||
echo "$0: debug[3]: NEXT_DIR=$NEXT_DIR" 1>&2
|
||||
fi
|
||||
|
||||
# validate JSON in status.json
|
||||
@@ -776,7 +798,7 @@ if [[ -z $CONTEST_STATUS ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# validate and normalize the contest_status cfrom status.json
|
||||
# validate and normalize the contest_status from status.json
|
||||
#
|
||||
case "$CONTEST_STATUS" in
|
||||
p|pending) CONTEST_STATUS="pending"
|
||||
@@ -795,6 +817,88 @@ if [[ -z $CONTEST_STATUS ]]; then
|
||||
esac
|
||||
fi
|
||||
|
||||
# determine the rules.md markdown file
|
||||
#
|
||||
export RULES_MD="$NEXT_DIR/rules.md"
|
||||
if [[ ! -e $RULES_MD ]]; then
|
||||
echo "$0: ERROR: rules.md does not exist: $RULES_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f $RULES_MD ]]; then
|
||||
echo "$0: ERROR: rules.md is not a regular file: $RULES_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -r $RULES_MD ]]; then
|
||||
echo "$0: ERROR: rules.md is not an readable file: $RULES_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -s $RULES_MD ]]; then
|
||||
echo "$0: ERROR: rules.md is not an non-empty readable file: $RULES_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
export RULES_HTML="$NEXT_DIR/rules.html"
|
||||
|
||||
# determine the rules.md markdown file
|
||||
#
|
||||
export GUIDELINES_MD="$NEXT_DIR/guidelines.md"
|
||||
if [[ ! -e $GUIDELINES_MD ]]; then
|
||||
echo "$0: ERROR: guidelines.md does not exist: $GUIDELINES_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f $GUIDELINES_MD ]]; then
|
||||
echo "$0: ERROR: guidelines.md is not a regular file: $GUIDELINES_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -r $GUIDELINES_MD ]]; then
|
||||
echo "$0: ERROR: guidelines.md is not an readable file: $GUIDELINES_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -s $GUIDELINES_MD ]]; then
|
||||
echo "$0: ERROR: guidelines.md is not an non-empty readable file: $GUIDELINES_MD" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
export GUIDELINES_HTML="$NEXT_DIR/guidelines.html"
|
||||
|
||||
# determine the rules hdr file
|
||||
#
|
||||
export RULES_HDR="$INC_PATH/rules.$CONTEST_STATUS.hdr"
|
||||
if [[ ! -e $RULES_HDR ]]; then
|
||||
echo "$0: ERROR: rules hdr file does not exist: $RULES_HDR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f $RULES_HDR ]]; then
|
||||
echo "$0: ERROR: rules hdr file is not a regular file: $RULES_HDR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -r $RULES_HDR ]]; then
|
||||
echo "$0: ERROR: rules hdr file is not an readable file: $RULES_HDR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -s $RULES_HDR ]]; then
|
||||
echo "$0: ERROR: rules hdr file is not an non-empty readable file: $RULES_HDR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# determine the guidelines hdr file
|
||||
#
|
||||
export GUIDELINES_HDR="$INC_PATH/guidelines.$CONTEST_STATUS.hdr"
|
||||
if [[ ! -e $GUIDELINES_HDR ]]; then
|
||||
echo "$0: ERROR: guidelines hdr file does not exist: $GUIDELINES_HDR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f $GUIDELINES_HDR ]]; then
|
||||
echo "$0: ERROR: guidelines hdr file is not a regular file: $GUIDELINES_HDR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -r $GUIDELINES_HDR ]]; then
|
||||
echo "$0: ERROR: guidelines hdr file is not an readable file: $GUIDELINES_HDR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -s $GUIDELINES_HDR ]]; then
|
||||
echo "$0: ERROR: guidelines hdr file is not an non-empty readable file: $GUIDELINES_HDR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# -N stops early before any processing is performed
|
||||
#
|
||||
if [[ -n $DO_NOT_PROCESS ]]; then
|
||||
@@ -826,6 +930,50 @@ elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: because of -n, temporary status.json file is not used: $TMP_STATUS_JSON" 1>&2
|
||||
fi
|
||||
|
||||
# create a temporary rules.md file
|
||||
#
|
||||
export TMP_RULES_MD=".$NAME.$$.entry.md"
|
||||
if [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: temporary rules.md file: $TMP_RULES_MD" 1>&2
|
||||
fi
|
||||
if [[ -z $NOOP ]]; then
|
||||
trap 'rm -f $TMP_STATUS_JSON $TMP_RULES_MD $TMP_GUIDELINES_MD; exit' 0 1 2 3 15
|
||||
rm -f "$TMP_RULES_MD"
|
||||
if [[ -e $TMP_RULES_MD ]]; then
|
||||
echo "$0: ERROR: cannot remove temporary rules.md file: $TMP_RULES_MD" 1>&2
|
||||
exit 14
|
||||
fi
|
||||
:> "$TMP_RULES_MD"
|
||||
if [[ ! -e $TMP_RULES_MD ]]; then
|
||||
echo "$0: ERROR: cannot create temporary rules.md file: $TMP_RULES_MD" 1>&2
|
||||
exit 15
|
||||
fi
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: because of -n, temporary rules.md file is not used: $TMP_RULES_MD" 1>&2
|
||||
fi
|
||||
|
||||
# create a temporary guidelines.md file
|
||||
#
|
||||
export TMP_GUIDELINES_MD=".$NAME.$$.entry.md"
|
||||
if [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: temporary guidelines.md file: $TMP_GUIDELINES_MD" 1>&2
|
||||
fi
|
||||
if [[ -z $NOOP ]]; then
|
||||
trap 'rm -f $TMP_STATUS_JSON $TMP_RULES_MD $TMP_GUIDELINES_MD; exit' 0 1 2 3 15
|
||||
rm -f "$TMP_GUIDELINES_MD"
|
||||
if [[ -e $TMP_GUIDELINES_MD ]]; then
|
||||
echo "$0: ERROR: cannot remove temporary guidelines.md file: $TMP_GUIDELINES_MD" 1>&2
|
||||
exit 12
|
||||
fi
|
||||
:> "$TMP_GUIDELINES_MD"
|
||||
if [[ ! -e $TMP_GUIDELINES_MD ]]; then
|
||||
echo "$0: ERROR: cannot create temporary guidelines.md file: $TMP_GUIDELINES_MD" 1>&2
|
||||
exit 13
|
||||
fi
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: because of -n, temporary guidelines.md file is not used: $TMP_GUIDELINES_MD" 1>&2
|
||||
fi
|
||||
|
||||
# generate the temporary status.json file
|
||||
#
|
||||
# In this stage, we use the date of the actual status.json file.
|
||||
@@ -838,11 +986,11 @@ if [[ -z $NOOP ]]; then
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to form temporary status.json file: $TMP_STATUS_JSON, error code: $status" 1>&2
|
||||
exit 12
|
||||
exit 16
|
||||
fi
|
||||
if [[ ! -s $TMP_STATUS_JSON ]]; then
|
||||
echo "$0: ERROR: failed to form temporary status.json, file missing or empty: $TMP_STATUS_JSON" 1>&2
|
||||
exit 13
|
||||
exit 17
|
||||
fi
|
||||
|
||||
# check if temporary status.json file is different from the actual status.json file
|
||||
@@ -867,7 +1015,7 @@ if [[ -z $NOOP ]]; then
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to touch -m $STATUS_JSON, error code: $status" 1>&2
|
||||
exit 14
|
||||
exit 18
|
||||
fi
|
||||
#
|
||||
# Rebuild temporary status.json file with updated (touched) modification time
|
||||
@@ -876,11 +1024,11 @@ if [[ -z $NOOP ]]; then
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to reform temporary status.json file: $TMP_STATUS_JSON, error code: $status" 1>&2
|
||||
exit 15
|
||||
exit 19
|
||||
fi
|
||||
if [[ ! -s $TMP_STATUS_JSON ]]; then
|
||||
echo "$0: ERROR: failed to reform temporary status.json, file missing or empty: $TMP_STATUS_JSON" 1>&2
|
||||
exit 16
|
||||
exit 20
|
||||
fi
|
||||
#
|
||||
# touch the temporary status.json file to have the updated (touched) modification time
|
||||
@@ -889,7 +1037,7 @@ if [[ -z $NOOP ]]; then
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to touch -m -r $STATUS_JSON $TMP_STATUS_JSON, error code: $status" 1>&2
|
||||
exit 17
|
||||
exit 21
|
||||
fi
|
||||
|
||||
# move the temporary status.json file into place
|
||||
@@ -900,14 +1048,14 @@ if [[ -z $NOOP ]]; then
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to mv -v -f $TMP_STATUS_JSON $STATUS_JSON, error code: $status" 1>&2
|
||||
exit 18
|
||||
exit 22
|
||||
fi
|
||||
else
|
||||
mv -f "$TMP_STATUS_JSON" "$STATUS_JSON"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to mv -f $TMP_STATUS_JSON $STATUS_JSON, error code: $status" 1>&2
|
||||
exit 19
|
||||
exit 23
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -930,7 +1078,7 @@ if [[ -z $NOOP ]]; then
|
||||
echo "$0: ERROR: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} --" \
|
||||
"status.md $STATUS_HTML" \
|
||||
"failed, error: $status" 1>&2
|
||||
exit 20
|
||||
exit 24
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: now up to date: $STATUS_HTML" 1>&2
|
||||
fi
|
||||
@@ -942,10 +1090,166 @@ elif [[ $V_FLAG -ge 5 ]]; then
|
||||
"status.md $STATUS_HTML" 1>&2
|
||||
fi
|
||||
|
||||
# update rules.md
|
||||
#
|
||||
if [[ -z $NOOP ]]; then
|
||||
|
||||
# form a new rules.md
|
||||
#
|
||||
cat "$RULES_HDR" > "$TMP_RULES_MD"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to cat $RULES_HDR > $TMP_RULES_MD, error code: $status" 1>&2
|
||||
exit 25
|
||||
fi
|
||||
sed -e '1,/^<!-- This is the last line modified by the tool: bin\/gen-status.sh -->/d' \
|
||||
"$RULES_MD" >> "$TMP_RULES_MD"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to sed -e '1,/<!--- ... -->/d' $RULES_MD >> $TMP_RULES_MD," \
|
||||
"error code: $status" 1>&2
|
||||
exit 26
|
||||
fi
|
||||
|
||||
# update rules.md is different
|
||||
#
|
||||
if cmp -s "$TMP_RULES_MD" "$RULES_MD"; then
|
||||
|
||||
# case: rules.md did not change
|
||||
#
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: rules.md file did not change: $RULES_MD" 1>&2
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
# case: rules.md changed, update the file
|
||||
#
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: mv -f -- $TMP_RULES_MD $RULES_MD" 1>&2
|
||||
fi
|
||||
if [[ $V_FLAG -ge 3 ]]; then
|
||||
mv -f -v -- "$TMP_RULES_MD" "$RULES_MD"
|
||||
status="$?"
|
||||
else
|
||||
mv -f -- "$TMP_RULES_MD" "$RULES_MD"
|
||||
status="$?"
|
||||
fi
|
||||
if [[ status -ne 0 ]]; then
|
||||
echo "$0: ERROR: mv -f -- $TMP_RULES_MD $RULES_MD filed, error code: $status" 1>&2
|
||||
elif [[ $V_FLAG -ge 1 ]]; then
|
||||
echo "$0: debug[1]: built replaced rules.md: $RULES_MD" 1>&2
|
||||
fi
|
||||
if [[ ! -s $RULES_MD ]]; then
|
||||
echo "$0: ERROR: not a non-empty rules.md file: $RULES_MD" 1>&2
|
||||
exit 27
|
||||
fi
|
||||
|
||||
# use the md2html.sh tool to form the rules.html file, unless -n
|
||||
#
|
||||
if [[ $V_FLAG -ge 1 ]]; then
|
||||
echo "$0: debug[1]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} --" \
|
||||
"next/rules.md $RULES_HTML" 1>&2
|
||||
fi
|
||||
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -- \
|
||||
next/rules.md "$RULES_HTML"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} --" \
|
||||
"next/rules.md $RULES_HTML" \
|
||||
"failed, error: $status" 1>&2
|
||||
exit 28
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: rules.md now up to date: $RULES_MD" 1>&2
|
||||
fi
|
||||
fi
|
||||
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: because of -n, rules.md was not updated: $RULES_MD" 1>&2
|
||||
fi
|
||||
|
||||
# update guidelines.md
|
||||
#
|
||||
if [[ -z $NOOP ]]; then
|
||||
|
||||
# form a new guidelines.md
|
||||
#
|
||||
cat "$GUIDELINES_HDR" > "$TMP_GUIDELINES_MD"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to cat $GUIDELINES_HDR > $TMP_GUIDELINES_MD, error code: $status" 1>&2
|
||||
exit 29
|
||||
fi
|
||||
sed -e '1,/^<!-- This is the last line modified by the tool: bin\/gen-status.sh -->/d' \
|
||||
"$GUIDELINES_MD" >> "$TMP_GUIDELINES_MD"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: failed to sed -e '1,/<!--- ... -->/d' $GUIDELINES_MD >> $TMP_GUIDELINES_MD," \
|
||||
"error code: $status" 1>&2
|
||||
exit 30
|
||||
fi
|
||||
|
||||
# update guidelines.md is different
|
||||
#
|
||||
if cmp -s "$TMP_GUIDELINES_MD" "$GUIDELINES_MD"; then
|
||||
|
||||
# case: guidelines.md did not change
|
||||
#
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: guidelines.md file did not change: $GUIDELINES_MD" 1>&2
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
# case: guidelines.md changed, update the file
|
||||
#
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: mv -f -- $TMP_GUIDELINES_MD $GUIDELINES_MD" 1>&2
|
||||
fi
|
||||
if [[ $V_FLAG -ge 3 ]]; then
|
||||
mv -f -v -- "$TMP_GUIDELINES_MD" "$GUIDELINES_MD"
|
||||
status="$?"
|
||||
else
|
||||
mv -f -- "$TMP_GUIDELINES_MD" "$GUIDELINES_MD"
|
||||
status="$?"
|
||||
fi
|
||||
if [[ status -ne 0 ]]; then
|
||||
echo "$0: ERROR: mv -f -- $TMP_GUIDELINES_MD $GUIDELINES_MD filed, error code: $status" 1>&2
|
||||
elif [[ $V_FLAG -ge 1 ]]; then
|
||||
echo "$0: debug[1]: built replaced guidelines.md: $GUIDELINES_MD" 1>&2
|
||||
fi
|
||||
if [[ ! -s $GUIDELINES_MD ]]; then
|
||||
echo "$0: ERROR: not a non-empty guidelines.md file: $GUIDELINES_MD" 1>&2
|
||||
exit 31
|
||||
fi
|
||||
|
||||
# use the md2html.sh tool to form the guidelines.html file, unless -n
|
||||
#
|
||||
if [[ $V_FLAG -ge 1 ]]; then
|
||||
echo "$0: debug[1]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} --" \
|
||||
"next/guidelines.md $guidelines_HTML" 1>&2
|
||||
fi
|
||||
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -- \
|
||||
next/guidelines.md "$GUIDELINES_HTML"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} --" \
|
||||
"next/guidelines.md $GUIDELINES_HTML" \
|
||||
"failed, error: $status" 1>&2
|
||||
exit 32
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: guidelines.md now up to date: $guidelines_MD" 1>&2
|
||||
fi
|
||||
fi
|
||||
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: because of -n, guidelines.md was not updated: $GUIDELINES_MD" 1>&2
|
||||
fi
|
||||
|
||||
# file cleanup
|
||||
#
|
||||
if [[ -z $NOOP ]]; then
|
||||
rm -f -- "$TMP_STATUS_JSON"
|
||||
rm -f -- "$TMP_STATUS_JSON" "$TMP_GUIDELINES_MD" "$TMP_RULES_MD"
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: because of -n, disabled: rm -f -- $TMP_STATUS_JSON" 1>&2
|
||||
fi
|
||||
|
||||
@@ -85,7 +85,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
||||
|
||||
# set variables referenced in the usage message
|
||||
#
|
||||
export VERSION="1.0.6 2024-04-13"
|
||||
export VERSION="1.0.7 2024-04-14"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -323,7 +323,7 @@ if [[ ! -d $YYYY ]]; then
|
||||
exit 6
|
||||
fi
|
||||
if [[ ! -r $YYYY ]]; then
|
||||
echo "$0: ERROR: arg is not a writable directory: $YYYY" 1>&2
|
||||
echo "$0: ERROR: arg is not a readable directory: $YYYY" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
||||
|
||||
# set variables referenced in the usage message
|
||||
#
|
||||
export VERSION="1.2.1 2024-04-13"
|
||||
export VERSION="1.2.2 2024-04-14"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -435,7 +435,7 @@ if [[ ! -d $YYYY ]]; then
|
||||
exit 6
|
||||
fi
|
||||
if [[ ! -r $YYYY ]]; then
|
||||
echo "$0: ERROR: arg is not a writable directory: $YYYY" 1>&2
|
||||
echo "$0: ERROR: arg is not a readable directory: $YYYY" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
||||
|
||||
# set variables referenced in the usage message
|
||||
#
|
||||
export VERSION="1.0.1 2024-04-13"
|
||||
export VERSION="1.0.2 2024-04-14"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -267,7 +267,7 @@ if [[ ! -d $YYYY ]]; then
|
||||
exit 6
|
||||
fi
|
||||
if [[ ! -r $YYYY ]]; then
|
||||
echo "$0: ERROR: arg is not a writable directory: $YYYY" 1>&2
|
||||
echo "$0: ERROR: arg is not a readable directory: $YYYY" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!-- START: this line starts content from: inc/guidelines.closed.hdr -->
|
||||
|
||||
# WARNING: These guidelines are OUT OF DATE
|
||||
|
||||
They are a **very tentative proposal** for the next IOCCC
|
||||
that is **VERY LIKELY** to be updated before the next IOCCC.
|
||||
They are are provided as a **very tentative** hint at what
|
||||
might be used in a future IOCCC.
|
||||
|
||||
Please regard these guidelines as a historic archive.
|
||||
|
||||
|
||||
# The IOCCC is closed
|
||||
|
||||
The IOCCC is **NOT** accepting new submissions at this time. See the
|
||||
[IOCCC winning entries page](years.html) for the entires that have won the IOCCC.
|
||||
|
||||
Watch both [the IOCCC status page](status.html) and the
|
||||
[@IOCCC mastodon feed](https://fosstodon.org/@ioccc) for information about future IOCCC openings.
|
||||
|
||||
<!-- END: the next line ends content from: inc/guidelines.closed.hdr -->
|
||||
<!-- This is the last line modified by the tool: bin/gen-status.sh -->
|
||||
@@ -0,0 +1,22 @@
|
||||
<!-- START: this line starts content from: inc/guidelines.judging.hdr -->
|
||||
|
||||
# The guidelines for the IOCCC that just closed
|
||||
|
||||
These guidelines are for the current IOCCC that is no longer open for new submissions.
|
||||
|
||||
See the [IOCCC news](../news.html) and well as the [IOCCC
|
||||
Mastodon](https://fosstodon.org/@ioccc) feed for updates
|
||||
on the IOCCC judging process as well as for the announcement
|
||||
for [who won the IOCCC](../years.html).
|
||||
|
||||
|
||||
# The IOCCC is closed to new submissions
|
||||
|
||||
The [IOCCC judges](judges.html) are in the process of judging the submissions they received
|
||||
the IOCCC was open.
|
||||
|
||||
Watch the [@IOCCC mastodon feed](https://fosstodon.org/@ioccc), as well as the
|
||||
[IOCCC news](news.html) page for updates.
|
||||
|
||||
<!-- END: the next line ends content from: inc/guidelines.judging.hdr -->
|
||||
<!-- This is the last line modified by the tool: bin/gen-status.sh -->
|
||||
@@ -0,0 +1,21 @@
|
||||
<!-- START: this line starts content from: inc/guidelines.open.hdr -->
|
||||
|
||||
# Official IOCCC guidelines
|
||||
|
||||
These guidelines are **OFFICIAL**.
|
||||
|
||||
Unless some significant problem turns up (such as a need to delay
|
||||
in when the IOCCC will close, or some major bug is discovered) they
|
||||
will remain **OFFICIAL** for this IOCCC.
|
||||
|
||||
**SUGGESTION**: Watch both the [IOCCC news](../news.html) and the [IOCCC
|
||||
Mastodon](https://fosstodon.org/@ioccc) feed for the latest news
|
||||
about any _mentions_ changes.
|
||||
|
||||
|
||||
# The IOCCC open for submissions
|
||||
|
||||
See the [IOCCC news](news.html) page for possible news about updates to these guidelines.
|
||||
|
||||
<!-- END: the next line ends content from: inc/guidelines.open.hdr -->
|
||||
<!-- This is the last line modified by the tool: bin/gen-status.sh -->
|
||||
@@ -0,0 +1,22 @@
|
||||
<!-- START: this line starts content from: inc/guidelines.pending.hdr -->
|
||||
|
||||
# WARNING: These guidelines are TENTATIVE
|
||||
|
||||
One might think of them as a **beta** release for the IOCCC
|
||||
that is about to open.
|
||||
|
||||
**IMPORTANT**: All **tentative** [rules](rules.html) and [guidelines](guidelines.html)
|
||||
are subject to change by the [IOCCC judges](../judges.html) at any time.
|
||||
See both the [IOCCC news](../news.html) and the [IOCCC
|
||||
Mastodon](https://fosstodon.org/@ioccc) feed as _sometimes_ the
|
||||
[IOCCC judges](../judges.html) _mention_ changes there.
|
||||
|
||||
|
||||
# The IOCCC is not yet open
|
||||
|
||||
While the IOCCC is not open now, there is a tentative opening date for the next IOCCC.
|
||||
|
||||
Comments and suggestions on these preliminary items are welcome.
|
||||
|
||||
<!-- END: the next line ends content from: inc/guidelines.pending.hdr -->
|
||||
<!-- This is the last line modified by the tool: bin/gen-status.sh -->
|
||||
@@ -0,0 +1,7 @@
|
||||
<!-- START: this line starts content from: inc/guidelines.year.hdr -->
|
||||
|
||||
# WARNING: These guidelines are OUT OF DATE
|
||||
|
||||
These guidelines are provided as a historic archive, only.
|
||||
|
||||
<!-- END: the next line ends content from: inc/guidelines.year.hdr -->
|
||||
+2
-2
@@ -365,7 +365,7 @@ next/rules.md
|
||||
-s
|
||||
TITLE=The International Obfuscated C Code Contest
|
||||
-s
|
||||
DESCRIPTION=IOCCC rules and guidelines
|
||||
DESCRIPTION=IOCCC Rules
|
||||
-s
|
||||
KEYWORDS=IOCCC, rules, Rules
|
||||
-s
|
||||
@@ -381,7 +381,7 @@ next/guidelines.md
|
||||
-s
|
||||
TITLE=The International Obfuscated C Code Contest
|
||||
-s
|
||||
DESCRIPTION=IOCCC guidelines
|
||||
DESCRIPTION=IOCCC Guidelines
|
||||
-s
|
||||
KEYWORDS=IOCCC, guidelines, Guidelines
|
||||
-s
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!-- START: this line starts content from: inc/rules.closed.hdr -->
|
||||
|
||||
# WARNING: These rules are OUT OF DATE
|
||||
|
||||
They are a **very tentative proposal** for the next IOCCC
|
||||
that is **VERY LIKELY** to be updated before the next IOCCC.
|
||||
They are are provided as a **very tentative** hint at what
|
||||
might be used in a future IOCCC.
|
||||
|
||||
Please regard these rules as a historic archive.
|
||||
|
||||
|
||||
# The IOCCC is closed
|
||||
|
||||
The IOCCC is **NOT** accepting new submissions at this time. See the
|
||||
[IOCCC winning entries page](years.html) for the entires that have won the IOCCC.
|
||||
|
||||
Watch both [the IOCCC status page](status.html) and the
|
||||
[@IOCCC mastodon feed](https://fosstodon.org/@ioccc) for information about future IOCCC openings.
|
||||
|
||||
<!-- END: the next line ends content from: inc/rules.closed.hdr -->
|
||||
<!-- This is the last line modified by the tool: bin/gen-status.sh -->
|
||||
@@ -0,0 +1,22 @@
|
||||
<!-- START: this line starts content from: inc/rules.judging.hdr -->
|
||||
|
||||
# The rules for the IOCCC that just closed
|
||||
|
||||
These rules are for the current IOCCC that is no longer open for new submissions.
|
||||
|
||||
See the [IOCCC news](../news.html) and well as the [IOCCC
|
||||
Mastodon](https://fosstodon.org/@ioccc) feed for updates
|
||||
on the IOCCC judging process as well as for the announcement
|
||||
for [who won the IOCCC](../years.html).
|
||||
|
||||
|
||||
# The IOCCC is closed to new submissions
|
||||
|
||||
The [IOCCC judges](judges.html) are in the process of judging the submissions they received
|
||||
the IOCCC was open.
|
||||
|
||||
Watch the [@IOCCC mastodon feed](https://fosstodon.org/@ioccc), as well as the
|
||||
[IOCCC news](news.html) page for updates.
|
||||
|
||||
<!-- END: the next line ends content from: inc/rules.judging.hdr -->
|
||||
<!-- This is the last line modified by the tool: bin/gen-status.sh -->
|
||||
@@ -0,0 +1,21 @@
|
||||
<!-- START: this line starts content from: inc/rules.open.hdr -->
|
||||
|
||||
# Official IOCCC rules
|
||||
|
||||
These rules are **OFFICIAL**.
|
||||
|
||||
Unless some significant problem turns up (such as a need to delay
|
||||
in when the IOCCC will close, or some major bug is discovered) they
|
||||
will remain **OFFICIAL** for this IOCCC.
|
||||
|
||||
**SUGGESTION**: Watch both the [IOCCC news](../news.html) and the [IOCCC
|
||||
Mastodon](https://fosstodon.org/@ioccc) feed for the latest news
|
||||
about any _mentions_ changes.
|
||||
|
||||
|
||||
# The IOCCC open for submissions
|
||||
|
||||
See the [IOCCC news](news.html) page for possible news about updates to these rules.
|
||||
|
||||
<!-- END: the next line ends content from: inc/rules.open.hdr -->
|
||||
<!-- This is the last line modified by the tool: bin/gen-status.sh -->
|
||||
@@ -0,0 +1,22 @@
|
||||
<!-- START: this line starts content from: inc/rules.pending.hdr -->
|
||||
|
||||
# WARNING: These rules are TENTATIVE
|
||||
|
||||
One might think of them as a **beta** release for the IOCCC
|
||||
that is about to open.
|
||||
|
||||
**IMPORTANT**: All **tentative** [rules](rules.html) and [guidelines](guidelines.html)
|
||||
are subject to change by the [IOCCC judges](../judges.html) at any time.
|
||||
See both the [IOCCC news](../news.html) and the [IOCCC
|
||||
Mastodon](https://fosstodon.org/@ioccc) feed as _sometimes_ the
|
||||
[IOCCC judges](../judges.html) _mention_ changes there.
|
||||
|
||||
|
||||
# The IOCCC is not yet open
|
||||
|
||||
While the IOCCC is not open now, there is a tentative opening date for the next IOCCC.
|
||||
|
||||
Comments and suggestions on these preliminary items are welcome.
|
||||
|
||||
<!-- END: the next line ends content from: inc/rules.pending.hdr -->
|
||||
<!-- This is the last line modified by the tool: bin/gen-status.sh -->
|
||||
@@ -0,0 +1,7 @@
|
||||
<!-- START: this line starts content from: inc/rules.year.hdr -->
|
||||
|
||||
# WARNING: These rules are OUT OF DATE
|
||||
|
||||
These rules are provided as a historic archive, only.
|
||||
|
||||
<!-- END: the next line ends content from: inc/rules.year.hdr -->
|
||||
@@ -11,7 +11,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>The International Obfuscated C Code Contest</title>
|
||||
<link rel="icon" type="image/x-icon" href="../favicon.ico">
|
||||
<meta name="description" content="IOCCC guidelines">
|
||||
<meta name="description" content="IOCCC Guidelines">
|
||||
<meta name="keywords" content="IOCCC, guidelines, Guidelines">
|
||||
</head>
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>The International Obfuscated C Code Contest</title>
|
||||
<link rel="icon" type="image/x-icon" href="../favicon.ico">
|
||||
<meta name="description" content="IOCCC rules and guidelines">
|
||||
<meta name="description" content="IOCCC Rules">
|
||||
<meta name="keywords" content="IOCCC, rules, Rules">
|
||||
</head>
|
||||
|
||||
|
||||
+10
-10
@@ -17642,7 +17642,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/2020/ferguson2/obfuscation.key</loc>
|
||||
<lastmod>2024-04-15T03:41:47+00:00</lastmod>
|
||||
<lastmod>2024-04-15T03:51:00+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/2020/ferguson2/obfuscation.md</loc>
|
||||
@@ -19090,19 +19090,19 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/gen-sitemap.sh</loc>
|
||||
<lastmod>2024-04-14T01:22:03+00:00</lastmod>
|
||||
<lastmod>2024-04-15T05:10:31+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/gen-status.sh</loc>
|
||||
<lastmod>2024-04-14T01:22:03+00:00</lastmod>
|
||||
<lastmod>2024-04-15T06:15:56+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/gen-top-html.sh</loc>
|
||||
<lastmod>2024-04-14T22:45:19+00:00</lastmod>
|
||||
<lastmod>2024-04-15T06:23:59+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/gen-year-index.sh</loc>
|
||||
<lastmod>2024-04-14T01:22:03+00:00</lastmod>
|
||||
<lastmod>2024-04-15T05:16:49+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/gen-years.sh</loc>
|
||||
@@ -19130,7 +19130,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/output-year-index.sh</loc>
|
||||
<lastmod>2024-04-14T01:22:03+00:00</lastmod>
|
||||
<lastmod>2024-04-15T05:20:49+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/pandoc-wrapper.sh</loc>
|
||||
@@ -19174,7 +19174,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/subst.year-index.sh</loc>
|
||||
<lastmod>2024-04-14T01:22:03+00:00</lastmod>
|
||||
<lastmod>2024-04-15T05:11:04+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/subst.year-navbar.awk</loc>
|
||||
@@ -19194,7 +19194,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/untar-year.sh</loc>
|
||||
<lastmod>2024-04-14T01:22:03+00:00</lastmod>
|
||||
<lastmod>2024-04-15T05:23:28+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/bugs.html</loc>
|
||||
@@ -19310,7 +19310,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/inc/md2html.cfg</loc>
|
||||
<lastmod>2024-04-14T22:25:14+00:00</lastmod>
|
||||
<lastmod>2024-04-15T06:18:21+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/inc/README.md</loc>
|
||||
@@ -19410,7 +19410,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/Makefile</loc>
|
||||
<lastmod>2024-04-14T23:47:54+00:00</lastmod>
|
||||
<lastmod>2024-04-15T06:27:07+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://ioccc-src.github.io/temp-test-ioccc/news.html</loc>
|
||||
|
||||
Reference in new issue
Block a user