Move try scripts from template/entry to next/
This commit is contained in:
1 parent
7fcf75ed58
commit
2afb973862
8 files changed
+14
-14
No files matched your search
@@ -465,7 +465,7 @@ writing by <a href="../contact.html">contacting the judges</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="leftbar">
|
||||
These <a href="guidelines.html">IOCCC guidelines</a> are version <strong>28.23 2024-12-01</strong>.
|
||||
These <a href="guidelines.html">IOCCC guidelines</a> are version <strong>28.24 2024-12-02</strong>.
|
||||
</p>
|
||||
<p><strong>IMPORTANT</strong>: Be <strong>SURE</strong> to read the <a href="rules.html">IOCCC rules</a>.</p>
|
||||
<p>Jump to: <a href="#">top</a></p>
|
||||
@@ -1096,8 +1096,8 @@ the <a href="https://www.ioccc.org/index.html">Official IOCCC winner website</a>
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
We <strong>LIKE</strong> submissions that use an edited version of the
|
||||
<a href="../template/entry/try.sh">../template/entry/try.sh</a> example script (and if you have alternate code,
|
||||
the same applies with the <a href="../template/entry/try.alt.sh">try.alt.sh</a>
|
||||
<a href="try.sh">try.sh</a> example script (and if you have alternate code,
|
||||
the same applies with the <a href="try.alt.sh">try.alt.sh</a>
|
||||
example script). Of course, it is quite possible that only one invocation is
|
||||
possible, so it is not necessarily detrimental to your submission if you do not
|
||||
include one, though we do like interesting and creative uses of submissions. See
|
||||
|
||||
+3
-3
@@ -52,7 +52,7 @@ Jump to: [top](#)
|
||||
</div>
|
||||
|
||||
<p class="leftbar">
|
||||
These [IOCCC guidelines](guidelines.html) are version **28.23 2024-12-01**.
|
||||
These [IOCCC guidelines](guidelines.html) are version **28.24 2024-12-02**.
|
||||
</p>
|
||||
|
||||
**IMPORTANT**: Be **SURE** to read the [IOCCC rules](rules.html).
|
||||
@@ -868,8 +868,8 @@ the [Official IOCCC winner website](https://www.ioccc.org/index.html).
|
||||
|
||||
<p class="leftbar">
|
||||
We **LIKE** submissions that use an edited version of the
|
||||
[../template/entry/try.sh](../template/entry/try.sh) example script (and if you have alternate code,
|
||||
the same applies with the [try.alt.sh](../template/entry/try.alt.sh)
|
||||
[try.sh](try.sh) example script (and if you have alternate code,
|
||||
the same applies with the [try.alt.sh](try.alt.sh)
|
||||
example script). Of course, it is quite possible that only one invocation is
|
||||
possible, so it is not necessarily detrimental to your submission if you do not
|
||||
include one, though we do like interesting and creative uses of submissions. See
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.alt.sh - demonstrate IOCCC entry YYYY/foo alternate code
|
||||
# XXX - try.alt.sh example version: 1.0.0-1 11-28-2024 - XXX
|
||||
#
|
||||
# XXX - NOTE: if your submission wins and become an entry, then - XXX
|
||||
# XXX - YYYY/foo will be changed to the 4 digit year and directory - XXX
|
||||
# XXX - name. - XXX
|
||||
# XXX - NOTE: please remove the XXX lines in this file, including this one - XXX
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
# XXX - if you need CC to be something else for some reason, say clang, - XXX
|
||||
# XXX - then change "cc" to that or whatever you need. - XXX
|
||||
# XXX - If you need other variables you can also set them in whatever way - XXX
|
||||
# XXX - you need; this is a good method, however, in cases where it's OK - XXX
|
||||
# XXX - to let the user redefine it. - XXX
|
||||
[[ -z "$CC" ]] && CC="cc"
|
||||
|
||||
# XXX - make sure to compile the alt code, using make alt! - XXX
|
||||
# XXX - if you need to build the main program for the try.alt.sh script, - XXX
|
||||
# XXX - then change the 'alt' to 'all alt' in the below command. - XXX
|
||||
# XXX - Later, if the submission wins, it can be changed to 'everything'. - XXX
|
||||
make CC="$CC" alt >/dev/null || exit 1
|
||||
|
||||
# XXX - it's usually a good idea to clear the screen but if not done - XXX
|
||||
# XXX - then you should remove the comment about it and the command. - XXX
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
# XXX - Invoke the program in one or more ways - XXX
|
||||
|
||||
# XXX - NOTE: you can include more than one command line and you - XXX
|
||||
# XXX - certainly can include pipelines. - XXX
|
||||
|
||||
# XXX - It is good to use the shell built-in read(1) to - XXX
|
||||
# XXX - let the user know what is about to be done, as - XXX
|
||||
# XXX - shown below, so they can proceed when ready. - XXX
|
||||
|
||||
# XXX - You may modify the command based on your program and you - XXX
|
||||
# XXX - may provide more than one invocation. - XXX
|
||||
|
||||
# XXX - Examples follow. - XXX
|
||||
|
||||
# XXX - if the prompt will not be too long, say more than 80 chars - XXX
|
||||
# XXX - or so: - XXX
|
||||
read -r -n 1 -p "Press any key to run: ./prog.alt: "
|
||||
echo 1>&2
|
||||
./prog.alt
|
||||
|
||||
# XXX - Otherwise, for longer command lines, you might try: - XXX
|
||||
echo "$ ./prog.alt some long command line"
|
||||
read -r -n 1 -p "Press any key to continue: "
|
||||
./prog.alt some long command line
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC entry YYYY/foo
|
||||
# XXX - try.sh example version: 1.0.0-1 11-28-2024 - XXX
|
||||
|
||||
# XXX - NOTE: if your submission wins and become an entry, then - XXX
|
||||
# XXX - YYYY/foo will be changed to the 4 digit year and directory - XXX
|
||||
# XXX - name. - XXX
|
||||
# XXX - NOTE: please remove the XXX lines in this file, including this one - XXX
|
||||
#
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
# XXX - if you need CC to be something else, say clang, then change cc - XXX
|
||||
# XXX - to whatever you need. - XXX
|
||||
# XXX - If you need other variables you can also set them in whatever way - XXX
|
||||
# XXX - you need; this is a good method, however, in cases where it's OK - XXX
|
||||
# XXX - to let the user redefine it. - XXX
|
||||
[[ -z "$CC" ]] && CC="cc"
|
||||
|
||||
|
||||
# XXX - make sure to compile the program, using make all! - XXX
|
||||
# XXX - if you need to build the alt code for the try.sh script, - XXX
|
||||
# XXX - then change the 'all' to 'all alt' in the below command. - XXX
|
||||
# XXX - Later, if the submission wins, it can be changed to 'everything'. - XXX
|
||||
make CC="$CC" all >/dev/null || exit 1
|
||||
|
||||
# XXX - it's usually a good idea to clear the screen but if not done - XXX
|
||||
# XXX - then you should remove the comment about it and the command. - XXX
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
# XXX - Invoke the program in one or more ways - XXX
|
||||
|
||||
# XXX - NOTE: you can include more than one command line and you - XXX
|
||||
# XXX - certainly can include pipelines. - XXX
|
||||
|
||||
# XXX - It is good to use the shell built-in read(1) to - XXX
|
||||
# XXX - let the user know what is about to be done, as - XXX
|
||||
# XXX - shown below, so they can proceed when ready. - XXX
|
||||
|
||||
# XXX - You may modify the command based on your program and you - XXX
|
||||
# XXX - may provide more than one invocation. - XXX
|
||||
|
||||
# XXX - Examples follow. - XXX
|
||||
|
||||
# XXX - if the prompt will not be too long, say more than 80 chars - XXX
|
||||
# XXX - or so: - XXX
|
||||
read -r -n 1 -p "Press any key to run: ./prog: "
|
||||
echo 1>&2
|
||||
./prog
|
||||
|
||||
# XXX - Otherwise, for longer command lines, you might try: - XXX
|
||||
echo "$ ./prog some long command line"
|
||||
read -r -n 1 -p "Press any key to continue: "
|
||||
./prog some long command line
|
||||
Reference in new issue
Block a user