Improve 2019/karns/try.sh, force -O0
The try.sh script now prompts for input rather than just sleep for 2 seconds. The README.md file has been format/typo checked. Added issues reported by the author to bugs.md. Force disable optimiser as the program doesn't work in some cases with it enabled. If I recall correctly it crashed in some cases, something the author noted happens sometimes (it is unknown if it is because they had it enabled or if it was something else but I have not experienced a crash since then).
This commit is contained in:
1 parent
f25d431417
commit
5e92359ccb
4 files changed
+73
-26
No files matched your search
+6
-9
@@ -20,13 +20,11 @@ clear
|
||||
# display prog.c to the user
|
||||
echo "$ cat prog.c"
|
||||
cat prog.c
|
||||
sleep 2
|
||||
|
||||
# run the program on itself
|
||||
echo "$ ./prog < prog.c"
|
||||
sleep 2
|
||||
# run the program on its own source code
|
||||
read -r -n 1 -p "Press any key to run: ./prog < prog.c: "
|
||||
echo 1>&2
|
||||
./prog < prog.c
|
||||
sleep 2
|
||||
|
||||
# reset terminal for colours
|
||||
reset
|
||||
@@ -34,13 +32,12 @@ reset
|
||||
# display maze
|
||||
echo "$ cat maze"
|
||||
cat maze
|
||||
sleep 2
|
||||
|
||||
# run the program on maze
|
||||
echo "$ ./prog < maze"
|
||||
sleep 2
|
||||
read -r -n 1 -p "Press any key to run: ./prog < maze: "
|
||||
echo 1>&2
|
||||
./prog < maze
|
||||
|
||||
sleep 2
|
||||
read -r -n 1 -p "Press any key to exit: "
|
||||
# reset terminal
|
||||
reset
|
||||
Reference in new issue
Block a user