rename bin/add-dir.sh to bin/new-dir.sh

We rename `bin/add-dir.sh` to `bin/new-dir.sh`.
The `bin/README.md` is updated accordingly.

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

Performed `make www` to accomplish the above and to test under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-08-11 14:34:45 -07:00
1 parent cad0490b0f
commit ee1ba8c7bd
3 files changed
+122 -44

No files matched your search

+70 -25
View File
@@ -75,23 +75,6 @@ be directly invoked as well, should you wish to see their output or if you have
some odd need to do so.
<div id="add-dir">
### [add-dir.sh](%%REPO_URL%%/bin/add-dir.sh)
</div>
This tool is used by the [Judges](../judges.html) as part of the final
steps to announce a new winning IOCCC entry.
Usage:
``` <!---sh-->
mkdir -p YYYY/dir
bin/add-dir.sh YYYY/dir
```
Here, `YYYY/dir` must be the path to the winning IOCCC entry.
<div id="all-run">
### [all-run.sh](%%REPO_URL%%/bin/all-run.sh)
</div>
@@ -234,12 +217,7 @@ This tool is used by the [Judges](../judges.html) as part of the final
steps to announce a new set of winning IOCCC entries.
Given a submission (that has won the IOCCC and thus will become an entry), with a `.auth.json`
and `.info.json` and **NO** `.entry.json` file (since it just won), we convert the
`.auth.json` and `.info.json` into a new `.entry.json` file.
This tool will, given a submission that has won the IOCCC (and thus will become a published entry), with
a `.auth.json` and `.info.json` and NO `.entry.json` file (since it's new), we
convert the `.auth.json` and `.info.json` into a new `.entry.json` file.
and `.info.json`, we convert the `.auth.json` and `.info.json` into a new `.entry.json` file.
**NOTE**: the `.auth.json` and `.info.json` files are formed by the
`mkiocccentry(1)` tool from the [mkiocccentry GitHub
@@ -260,8 +238,49 @@ Usage:
bin/cvt-submission.sh -v 1 YYYY/dir
```
Here, `YYYY/dir` is the path of the submission under the `YYYY`
year directory. For instance
Here, `YYYY/dir` is the path of the submission under the `YYYY` year directory.
This tool will form a compressed tarball of any files under `YYYY/dir`
that could be modified or removed by this tool (unless `-N` is used in which
case this tool does nothing). The compressed tarball, formed by default
under the `/var/tmp` directory, may contain such as:
- YYYY/dir/.info.json
- YYYY/dir/.auth.json
- YYYY/dir/remarks.md
- YYYY/dir/README.md
- YYYY/dir/index.md
- YYYY/dir/YYYY_dir.tar.bz2
- author/author_handle.json (could be more than one file)
Only those files that exist will be put into the compressed tarball.
The compressed tarball formed (by default under the `/var/tmp` directory)
is of the following form:
> YYYY_dir.YYYYMMDD.hhmmss.tar.bz2
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
```
One may also restore modified `author/author_handle.json` files using:
```sh
tar -jxvf /var/tmp/YYYY_dir.YYYYMMDD.hhmmss.tar.bz2 author
```
**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)
need to add content. Moreover, the `Makefile` and `.gitignore` files
need to be examined for suitability, etc.
**HINT**: Executing this tool on your submission will **NOT** make you an IOCCC winner. :-)
<div id="entry2csv">
@@ -665,6 +684,32 @@ This tool is used in the [bin/md2html.cfg](%%REPO_URL%%/bin/md2html.cfg) file as
the [md2html tool](index.html#md2html).
<div id="new-dir">
### [new-dir.sh](%%REPO_URL%%/bin/new-dir.sh)
</div>
This tool is used by the [Judges](../judges.html) as one of the
steps needed to announce a new winning IOCCC entry.
Usage:
``` <!---sh-->
mkdir -p YYYY/dir
bin/new-dir.sh YYYY/dir
```
Here, `YYYY/dir` must be the path to the winning IOCCC entry.
**NOTE**: This tool does **NOT** perform all of the steps needed
to make a directory a new winning IOCCC entry. It only starts the
framework for doing so, creating a situation where the
[cvt-submission](#cvt-submission) tool be be run.
This tool can modify the top level `.allyear` file, and `YYYY/Makefile` files.
**HINT**: Executing this tool on your submission will **NOT** make you an IOCCC winner. :-)
<div id="new_year">
### [new-year.sh](%%REPO_URL%%/bin/new-year.sh)
</div>
+49 -16
View File
@@ -433,15 +433,6 @@ that you use the <code>-h</code> option on it first.</p>
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/md2html.cfg">bin/md2html.cfg</a> file but some of these tools can
be directly invoked as well, should you wish to see their output or if you have
some odd need to do so.</p>
<div id="add-dir">
<h3 id="add-dir.sh"><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/add-dir.sh">add-dir.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 winning IOCCC entry.</p>
<p>Usage:</p>
<pre><code> mkdir -p YYYY/dir
bin/add-dir.sh YYYY/dir</code></pre>
<p>Here, <code>YYYY/dir</code> must be the path to the winning IOCCC entry.</p>
<div id="all-run">
<h3 id="all-run.sh"><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/all-run.sh">all-run.sh</a></h3>
</div>
@@ -531,11 +522,7 @@ content).</p>
<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>Given a submission (that has won the IOCCC and thus will become an entry), with a <code>.auth.json</code>
and <code>.info.json</code> and <strong>NO</strong> <code>.entry.json</code> file (since it just won), we convert the
<code>.auth.json</code> and <code>.info.json</code> into a new <code>.entry.json</code> file.</p>
<p>This tool will, given a submission that has won the IOCCC (and thus will become a published entry), with
a <code>.auth.json</code> and <code>.info.json</code> and NO <code>.entry.json</code> file (since it’s new), we
convert the <code>.auth.json</code> and <code>.info.json</code> into a new <code>.entry.json</code> file.</p>
and <code>.info.json</code>, we convert the <code>.auth.json</code> and <code>.info.json</code> into a new <code>.entry.json</code> file.</p>
<p><strong>NOTE</strong>: the <code>.auth.json</code> and <code>.info.json</code> files are formed by the
<code>mkiocccentry(1)</code> tool from the <a href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry GitHub
repo</a> as part of packaging
@@ -549,8 +536,39 @@ See also the
FAQ on “<a href="../faq.html#entry_json">.entry.json</a>”.</p>
<p>Usage:</p>
<pre><code> bin/cvt-submission.sh -v 1 YYYY/dir</code></pre>
<p>Here, <code>YYYY/dir</code> is the path of the submission under the <code>YYYY</code>
year directory. For instance</p>
<p>Here, <code>YYYY/dir</code> is the path of the submission under the <code>YYYY</code> year directory.</p>
<p>This tool will form a compressed tarball of any files under <code>YYYY/dir</code>
that could be modified or removed by this tool (unless <code>-N</code> is used in which
case this tool does nothing). The compressed tarball, formed by default
under the <code>/var/tmp</code> directory, may contain such as:</p>
<ul>
<li>YYYY/dir/.info.json</li>
<li>YYYY/dir/.auth.json</li>
<li>YYYY/dir/remarks.md</li>
<li>YYYY/dir/README.md</li>
<li>YYYY/dir/index.md</li>
<li>YYYY/dir/YYYY_dir.tar.bz2</li>
<li>author/author_handle.json (could be more than one file)</li>
</ul>
<p>Only those files that exist will be put into the compressed tarball.
The compressed tarball formed (by default under the <code>/var/tmp</code> directory)
is of the following form:</p>
<blockquote>
<p>YYYY_dir.YYYYMMDD.hhmmss.tar.bz2</p>
</blockquote>
<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>
<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>
<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>
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>
<div id="entry2csv">
<h3 id="entry2csv.sh"><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/entry2csv.sh">entry2csv.sh</a></h3>
</div>
@@ -773,6 +791,21 @@ page.</p>
1984/anonymous</a>.</p>
<p>This tool is used in the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/md2html.cfg">bin/md2html.cfg</a> file as part of
the <a href="index.html#md2html">md2html tool</a>.</p>
<div id="new-dir">
<h3 id="new-dir.sh"><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/new-dir.sh">new-dir.sh</a></h3>
</div>
<p>This tool is used by the <a href="../judges.html">Judges</a> as one of the
steps needed to announce a new winning IOCCC entry.</p>
<p>Usage:</p>
<pre><code> mkdir -p YYYY/dir
bin/new-dir.sh YYYY/dir</code></pre>
<p>Here, <code>YYYY/dir</code> must be the path to the winning IOCCC entry.</p>
<p><strong>NOTE</strong>: This tool does <strong>NOT</strong> perform all of the steps needed
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>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>
+3 -3
View File
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#
# add-dir.sh - add a new entry directory under an IOCCC year
# new-dir.sh - add a new entry directory under an IOCCC year
#
# We update YYYY/.year to reference a new entry directory under
# a given IOCCC year.
# a given IOCCC year. We also update the to level `.allyear` too.
#
# Copyright (c) 2024 by Landon Curt Noll. All Rights Reserved.
#
@@ -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.2 2024-08-09"
export VERSION="1.3 2024-08-11"
NAME=$(basename "$0")
export NAME
export V_FLAG=0