Update 2013/birken/try.sh + format/typo checks
The try.sh script now does a random run of the program (previously in
the remarks in the try section) involving perl but only if perl is
installed in the system.
The README.md file has been format/typo fixed.
It is not clear if this entry is done or not yet as it might be improved
if try.sh is renamed try.alt.sh (for the alt version which it uses) and
a new try.sh be formed which uses the original code so that one does not
have to do say:
BIRKEN=birken ./try.sh
This probably would be better but it is not done yet.
This commit is contained in:
1 parent
75ac0752ed
commit
250a5a12be
3 files changed
+83
-51
No files matched your search
+8
-1
@@ -9,7 +9,7 @@ if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
make CC="$CC" everything >/dev/null || exit 1
|
||||
make clobber CC="$CC" everything >/dev/null || exit 1
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
@@ -20,6 +20,13 @@ fi
|
||||
|
||||
trap 'reset; exit' 0 1 2 3 15
|
||||
|
||||
PERL="$(type -P perl)"
|
||||
|
||||
if [[ -n "$PERL" ]]; then
|
||||
read -r -n 1 -p "Press any key to try a random run: "
|
||||
perl -e 'map{map{print int(rand()*8);}(0..16);print chr(10);}(0..30);' | tr '[0-4]' ' '| ./birken.alt
|
||||
fi
|
||||
|
||||
for i in *.txt; do
|
||||
NAME="$(echo "$i" | awk '{ print toupper(substr($1,1,1)) substr($1,2)}'|sed -e 's/\.txt//g' \
|
||||
-e 's/Ioccc/IOCCC/g' -e 's/Mspacman/Ms Pac-Man/g' -e 's/Helloworld/Hello World/g' \
|
||||
|
||||
Reference in new issue
Block a user