Rename 1992/runme.sh lush.sh and improve it
The script now lets one specify which compiler to use so that one can (in the case that their cc is clang, for instance like it is with macOS) specify a path to a real gcc compiler.
This commit is contained in:
1 parent
27ba4879a1
commit
7031130843
5 files changed
+22
-10
No files matched your search
+1
-1
@@ -19,7 +19,7 @@ For more detailed information see [1992 lush in bugs.md](/bugs.md#1992-lush).
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./runme.sh
|
||||
./lush.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# lush.sh - run IOCCC winner 1992/lush
|
||||
#
|
||||
|
||||
# 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.
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
make clobber all
|
||||
"$CC" -include stdio.h -o lush lush.c|& ./lush
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
make clobber all
|
||||
cc -include stdio.h -o lush lush.c|& ./lush
|
||||
@@ -995,7 +995,8 @@ If you want to try and fix this (mis)feature, you are welcome to try.
|
||||
### Information: [1992/lush/README.md](1992/lush/README.md)
|
||||
|
||||
We used a patch from [Yusuke Endoh](/winners.html#Yusuke_Endoh) to get this to
|
||||
work but it only works with gcc. Cody removed the warnings of `gets()`.
|
||||
work but it only works with gcc. Cody removed the warnings of `gets()` and
|
||||
provided a script to run the entry properly.
|
||||
|
||||
Unfortunately due to the way the entry works and the fact that other compilers
|
||||
like clang have different warnings and errors this simply does not work with
|
||||
@@ -1069,6 +1070,7 @@ Hello World.
|
||||
|
||||
Can you help us?
|
||||
|
||||
|
||||
## 1992 vern
|
||||
|
||||
### STATUS: INABIAF - please **DO NOT** fix
|
||||
|
||||
+4
-4
@@ -1568,13 +1568,13 @@ it moves towards the right but if you click the mouse it goes back.
|
||||
[Yusuke](#yusuke) supplied a patch which makes this work with gcc. Due to how it works (see
|
||||
Judges' remarks in the README.md file) this will not work with clang.
|
||||
|
||||
[Cody](#cody) also provided the `runme.sh` script to demonstrate it as using make was
|
||||
problematic.
|
||||
[Cody](#cody) also provided the [lush.sh](/1992/lush/lush.sh) script to
|
||||
demonstrate it as using make was problematic.
|
||||
|
||||
Cody made it use `fgets()` instead of `gets()`.
|
||||
|
||||
NOTE: this entry cannot work with clang due to different compiler messages. See
|
||||
[bugs.md](/bugs.md) for details.
|
||||
NOTE: this entry cannot work with clang due to different compiler messages (it
|
||||
will compile fine but it won't work). See [bugs.md](/bugs.md) for details.
|
||||
|
||||
|
||||
## <a name="1992_marangon"></a>[1992/marangon](/1992/marangon/marangon.c) ([README.md](/1992/marangon/README.md))
|
||||
|
||||
Reference in new issue
Block a user