improve bin/new-dir.sh and bin/README.md

We improve debug messages in `bin/new-dir.sh`.

Updated `bin/README.md` with more information about
the recently added utilities.

Changed `bin/new-dir.sh` VERSION from "1.3 2024-08-11"
to "1.3.1 2024-08-11".

Performed `make quick_www` to accomplish the above and to test under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-08-11 17:21:55 -07:00
1 parent ee1ba8c7bd
commit 4d75ebc6c0
3 files changed
+50 -19

No files matched your search

+23 -7
View File
@@ -259,24 +259,28 @@ is of the following form:
> YYYY_dir.YYYYMMDD.hhmmss.tar.bz2
Here "_YYYYMMDD.hhmmss_" is a date and timestamp from when the tool was executed.
The purpose of this compressed tarball is to allow the files in the
submission directory (that could be modified or removed by this tool)
to be restored as follows:
```sh
tar -jxvf /var/tmp/YYYY_dir.YYYYMMDD.hhmmss.tar.bz2 YYYY/dir
``` <!---sh-->
tar -jxvf /var/tmp/YYYY_dir.YYYYMMDD.hhmmss.tar.bz2 YYYY/dir
```
One may also restore modified `author/author_handle.json` files using:
```sh
tar -jxvf /var/tmp/YYYY_dir.YYYYMMDD.hhmmss.tar.bz2 author
``` <!---sh-->
tar -jxvf /var/tmp/YYYY_dir.YYYYMMDD.hhmmss.tar.bz2 author
```
This tool will form `YYYY/dir/README.md` if needed, from `YYYY/dir/remarks.md`,
`template/entry/README.md.head`, and `template/entry/README.md.tail`.
**NOTE**: This interactive tool (unless `-i input_data` is used) does
**NOT** perform all of the steps needed to make a directory a new winning
IOCCC entry. For example, files such as `README.md` and/or `index.html`
might contain "**XXX**" patterns indicating where the [Judges](../judges.html)
IOCCC entry. For example, files such as `YYYY/dir/README.md` and/or `YYYY/dir/index.html`
might contain "_triple X_" patterns indicating where the [Judges](../judges.html)
need to add content. Moreover, the `Makefile` and `.gitignore` files
need to be examined for suitability, etc.
@@ -707,6 +711,9 @@ framework for doing so, creating a situation where the
This tool can modify the top level `.allyear` file, and `YYYY/Makefile` files.
**NOTE**: This tool assumes that [new-year.sh](#new_year) was executed to create
the prerequisite `YYYY` directory and related files.
**HINT**: Executing this tool on your submission will **NOT** make you an IOCCC winner. :-)
@@ -717,13 +724,22 @@ This tool can modify the top level `.allyear` file, and `YYYY/Makefile` files.
This tool is used by the [Judges](../judges.html) as part of the final
steps to announce a new set of winning IOCCC entries.
This tool may modify the top level `.top` and `Makefile` files.
It will form `YYYY/Makefile` and/or `YYYY/.year` if needed.
It will form `YYYY/README.md` if needed, from `template/README.md.year`.
**NOTE**: This tool **NOT** perform all of the steps needed to make a new IOCCC year directory.
For example, files such as `YYYY/README.md` and/or `YYYY/index.html`
might contain "_triple X_" patterns indicating where the [Judges](../judges.html)
need to add content.
Usage:
``` <!---sh-->
bin/new-year.sh -v 1 YYYY
```
Here, `YYYY` must be a new 4-digit IOCCC year.
Here, `YYYY` must be a new 4-digit (happy :-)) new IOCCC year.
<div id="output-index-inventory">
+17 -5
View File
@@ -556,16 +556,19 @@ is of the following form:</p>
<blockquote>
<p>YYYY_dir.YYYYMMDD.hhmmss.tar.bz2</p>
</blockquote>
<p>Here “<em>YYYYMMDD.hhmmss</em>” is a date and timestamp from when the tool was executed.</p>
<p>The purpose of this compressed tarball is to allow the files in the
submission directory (that could be modified or removed by this tool)
to be restored as follows:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="fu">tar</span> <span class="at">-jxvf</span> /var/tmp/YYYY_dir.YYYYMMDD.hhmmss.tar.bz2 YYYY/dir</span></code></pre></div>
<pre><code> tar -jxvf /var/tmp/YYYY_dir.YYYYMMDD.hhmmss.tar.bz2 YYYY/dir</code></pre>
<p>One may also restore modified <code>author/author_handle.json</code> files using:</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">tar</span> <span class="at">-jxvf</span> /var/tmp/YYYY_dir.YYYYMMDD.hhmmss.tar.bz2 author</span></code></pre></div>
<pre><code> tar -jxvf /var/tmp/YYYY_dir.YYYYMMDD.hhmmss.tar.bz2 author</code></pre>
<p>This tool will form <code>YYYY/dir/README.md</code> if needed, from <code>YYYY/dir/remarks.md</code>,
<code>template/entry/README.md.head</code>, and <code>template/entry/README.md.tail</code>.</p>
<p><strong>NOTE</strong>: This interactive tool (unless <code>-i input_data</code> is used) does
<strong>NOT</strong> perform all of the steps needed to make a directory a new winning
IOCCC entry. For example, files such as <code>README.md</code> and/or <code>index.html</code>
might contain “<strong>XXX</strong>” patterns indicating where the <a href="../judges.html">Judges</a>
IOCCC entry. For example, files such as <code>YYYY/dir/README.md</code> and/or <code>YYYY/dir/index.html</code>
might contain “<em>triple X</em>” patterns indicating where the <a href="../judges.html">Judges</a>
need to add content. Moreover, the <code>Makefile</code> and <code>.gitignore</code> files
need to be examined for suitability, etc.</p>
<p><strong>HINT</strong>: Executing this tool on your submission will <strong>NOT</strong> make you an IOCCC winner. :-)</p>
@@ -805,15 +808,24 @@ to make a directory a new winning IOCCC entry. It only starts the
framework for doing so, creating a situation where the
<a href="#cvt-submission">cvt-submission</a> tool be be run.</p>
<p>This tool can modify the top level <code>.allyear</code> file, and <code>YYYY/Makefile</code> files.</p>
<p><strong>NOTE</strong>: This tool assumes that <a href="#new_year">new-year.sh</a> was executed to create
the prerequisite <code>YYYY</code> directory and related files.</p>
<p><strong>HINT</strong>: Executing this tool on your submission will <strong>NOT</strong> make you an IOCCC winner. :-)</p>
<div id="new_year">
<h3 id="new-year.sh"><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/new-year.sh">new-year.sh</a></h3>
</div>
<p>This tool is used by the <a href="../judges.html">Judges</a> as part of the final
steps to announce a new set of winning IOCCC entries.</p>
<p>This tool may modify the top level <code>.top</code> and <code>Makefile</code> files.
It will form <code>YYYY/Makefile</code> and/or <code>YYYY/.year</code> if needed.
It will form <code>YYYY/README.md</code> if needed, from <code>template/README.md.year</code>.</p>
<p><strong>NOTE</strong>: This tool <strong>NOT</strong> perform all of the steps needed to make a new IOCCC year directory.
For example, files such as <code>YYYY/README.md</code> and/or <code>YYYY/index.html</code>
might contain “<em>triple X</em>” patterns indicating where the <a href="../judges.html">Judges</a>
need to add content.</p>
<p>Usage:</p>
<pre><code> bin/new-year.sh -v 1 YYYY</code></pre>
<p>Here, <code>YYYY</code> must be a new 4-digit IOCCC year.</p>
<p>Here, <code>YYYY</code> must be a new 4-digit (happy :-)) new IOCCC year.</p>
<div id="output-index-inventory">
<h3 id="output-index-inventory.sh"><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/output-index-inventory.sh">output-index-inventory.sh</a></h3>
</div>
+10 -7
View File
@@ -88,7 +88,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 2024-08-11"
export VERSION="1.3.1 2024-08-11"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -385,8 +385,8 @@ if [[ -z $NOOP ]]; then
# append entry directory path to .year
#
if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: appending YYYY_DIR: $YYYY_DIR to: $DOT_YEAR" 1>&2
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: making sure that YYYY_DIR: $YYYY_DIR is in: $DOT_YEAR" 1>&2
fi
echo "$YYYY_DIR" >> "$DOT_YEAR"
@@ -406,8 +406,8 @@ if [[ -z $NOOP ]]; then
# firewall - verify YYYY_DIR in .year
#
if grep -E -q "^$YYYY_DIR$" "$DOT_YEAR"; then
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: YYYY_DIR: $YYYY_DIR is in: $DOT_YEAR" 1>&2
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: YYYY_DIR: $YYYY_DIR is in: $DOT_YEAR" 1>&2
fi
else
echo "$0: ERROR: failed to add YYYY_DIR: $YYYY_DIR to: $DOT_YEAR" 1>&2
@@ -472,8 +472,8 @@ if [[ -z $NOOP ]]; then
# case: Makefile file changed, update the file
#
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: about to: mv -f -- $TMP_MAKEFILE $MAKE_FILE" 1>&2
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: about to: mv -f -- $TMP_MAKEFILE $MAKE_FILE" 1>&2
fi
if [[ $V_FLAG -ge 3 ]]; then
mv -f -v -- "$TMP_MAKEFILE" "$MAKE_FILE"
@@ -512,6 +512,9 @@ if [[ -z $NOOP ]]; then
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: make genpath complete" 1>&2
fi
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: ready for: bin/cvt-submission.sh -v $V_FLAG $YYYY_DIR" 1>&2
fi
# case: with -n
#