Improve 1996/westley/try scripts
This commit is contained in:
1 parent
6344fd5584
commit
31793b035c
3 files changed
+25
-15
No files matched your search
+14
-5
@@ -15,13 +15,22 @@ make CC="$CC" everything >/dev/null || exit 1
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
echo "Showing alt grandfather clock:" 1>&2
|
||||
echo "WARNING: this is likely to segfault after showing the output." 1>&2
|
||||
echo "It might also show one or more environmental variables. Use" 1>&2
|
||||
echo "try.sh if you want to see the fixed version." 1>&2
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to show alt grandfather clock: "
|
||||
echo 1>&2
|
||||
WESTLEY=./westley.alt ./clock1.sh
|
||||
read -r -n 1 -p "Press any key to continue: " 1>&2
|
||||
echo 1>&2
|
||||
|
||||
echo "Showing alt mantle clock that runs backwards:" 1>&2
|
||||
read -r -n 1 -p "Press any key to show alt mantle clock that runs backwards: "
|
||||
echo 1>&2
|
||||
WESTLEY=./westley.alt ./clock2.sh
|
||||
read -r -n 1 -p "Press any key to continue: " 1>&2
|
||||
echo 1>&2
|
||||
|
||||
echo "Showing alt linear style clock:" 1>&2
|
||||
read -r -n 1 -p "Press any key to show alt linear style clock: "
|
||||
echo 1>&2
|
||||
WESTLEY=./westley.alt ./clock3.sh
|
||||
echo 1>&2
|
||||
+9
-5
@@ -15,13 +15,17 @@ make CC="$CC" everything >/dev/null || exit 1
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
echo "Showing grandfather clock:" 1>&2
|
||||
read -r -n 1 -p "Press any key to show grandfather clock: "
|
||||
echo 1>&2
|
||||
WESTLEY=./westley ./clock1.sh
|
||||
read -r -n 1 -p "Press any key to continue: " 1>&2
|
||||
echo 1>&2
|
||||
|
||||
echo "Showing mantle clock that runs backwards:" 1>&2
|
||||
read -r -n 1 -p "Press any key to show alt mantle clock that runs backwards: "
|
||||
echo 1>&2
|
||||
WESTLEY=./westley ./clock2.sh
|
||||
read -r -n 1 -p "Press any key to continue: " 1>&2
|
||||
echo 1>&2
|
||||
|
||||
echo "Showing linear style clock:" 1>&2
|
||||
read -r -n 1 -p "Press any key to show alt linear style clock: "
|
||||
echo 1>&2
|
||||
WESTLEY=./westley ./clock3.sh
|
||||
echo 1>&2
|
||||
+2
-5
@@ -2213,14 +2213,11 @@ when reading the author's comments. To see how to use the original, see the
|
||||
README.md file.
|
||||
|
||||
Cody also added the two scripts, [try.sh](/1996/westley/try.sh) and
|
||||
[try.alt.sh](/1996/westley/try.alt.sh) to show automate showing the different
|
||||
[try.alt.sh](/1996/westley/try.alt.sh) to automate showing the different
|
||||
clocks, both with the fixed version and the original (alt) version.
|
||||
|
||||
Also, to fix any potential problem with displaying in GitHub the scripts
|
||||
provided by the author, Cody added '.sh'.
|
||||
|
||||
Later Cody made the entry look more like the original, removing the `argc` in
|
||||
`main()` (K&R style functions).
|
||||
provided by the author, Cody added '.sh' to the `clock[1-3].sh` scripts.
|
||||
|
||||
|
||||
# <a name="1998"></a>1998
|
||||
|
||||
Reference in new issue
Block a user