Improve 2015/howe/try.sh and fix make clobber
The make clobber rule now removes *.tmp instead of just specific .tmp files. Updated .gitignore: removed the foo.tmp globs and added *.tmp.
This commit is contained in:
1 parent
c076836243
commit
9e60b74e72
3 files changed
+68
-31
No files matched your search
+1
-20
@@ -1,31 +1,12 @@
|
|||||||
#
|
#
|
||||||
# sort with: sort -d -u
|
# sort with: sort -d -u
|
||||||
123.tmp
|
|
||||||
1.tmp
|
|
||||||
ABCABBA.tmp
|
|
||||||
ABCDEFGHIJK.tmp
|
|
||||||
ABCDEF.tmp
|
|
||||||
ABCDE.tmp
|
|
||||||
ABCD.tmp
|
|
||||||
ABCEFGIJKDEFGHIJK.tmp
|
|
||||||
ABD.tmp
|
|
||||||
ABXYEFCD.tmp
|
|
||||||
ACBDEACBED.tmp
|
|
||||||
ACDBECFD.tmp
|
|
||||||
ACEBDABBABED.tmp
|
|
||||||
A.tmp
|
|
||||||
CBABAC.tmp
|
|
||||||
EMPTY.tmp
|
|
||||||
curds.tmp
|
|
||||||
*.dSYM
|
*.dSYM
|
||||||
indent
|
indent
|
||||||
indent.c
|
indent.c
|
||||||
indent.o
|
indent.o
|
||||||
makeholes
|
makeholes
|
||||||
nuked.tmp
|
|
||||||
patch.tmp
|
|
||||||
prog
|
prog
|
||||||
prog.alt
|
prog.alt
|
||||||
prog.orig
|
prog.orig
|
||||||
|
*.tmp
|
||||||
war-and-peace.txt
|
war-and-peace.txt
|
||||||
whey.tmp
|
|
||||||
+1
-1
@@ -214,7 +214,7 @@ clean:
|
|||||||
clobber: clean
|
clobber: clean
|
||||||
${RM} -f ${TARGET} ${ALT_TARGET}
|
${RM} -f ${TARGET} ${ALT_TARGET}
|
||||||
${RM} -rf *.dSYM
|
${RM} -rf *.dSYM
|
||||||
${RM} -f curds.tmp nuked.tmp whey.tmp makeholes
|
${RM} -f makeholes *.tmp
|
||||||
@-if [ -e sandwich ]; then \
|
@-if [ -e sandwich ]; then \
|
||||||
${RM} -f sandwich; \
|
${RM} -f sandwich; \
|
||||||
echo 'ate sandwich'; \
|
echo 'ate sandwich'; \
|
||||||
|
|||||||
+66
-10
@@ -16,22 +16,78 @@ make CC="$CC" all >/dev/null || exit 1
|
|||||||
clear
|
clear
|
||||||
|
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./prog prog.alt.c prog.c: "
|
||||||
|
echo 1>&2
|
||||||
./prog prog.alt.c prog.c
|
./prog prog.alt.c prog.c
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
make test
|
read -r -n 1 -p "Press any key to run: make test (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
make test | less -rEXFK
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./prog -d ABXYEFCD.tmp ACDBECFD.tmp: "
|
||||||
|
echo 1>&2
|
||||||
./prog -d ABXYEFCD.tmp ACDBECFD.tmp
|
./prog -d ABXYEFCD.tmp ACDBECFD.tmp
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./prog ABXYEFCD.tmp ACDBECFD.tmp: "
|
||||||
|
echo 1>&2
|
||||||
./prog ABXYEFCD.tmp ACDBECFD.tmp
|
./prog ABXYEFCD.tmp ACDBECFD.tmp
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
rm -f curds.tmp whey.tmp
|
rm -f curds.tmp whey.tmp
|
||||||
cp -f cc.1 curds.tmp
|
read -r -n 1 -p "Press any key to run: cp -vf cc.1 curds.tmp: "
|
||||||
cp -f cc.1 whey.tmp
|
echo 1>&2
|
||||||
chmod 666 whey.tmp
|
cp -vf cc.1 curds.tmp
|
||||||
make makeholes
|
echo 1>&2
|
||||||
./makeholes -n 1000 whey.tmp
|
read -r -n 1 -p "Press any key to run: cp -vf cc.1 whey.tmp: "
|
||||||
./prog curds.tmp whey.tmp
|
echo 1>&2
|
||||||
./avgtime.sh 100 ./prog curds.tmp whey.tmp
|
cp -vf cc.1 whey.tmp
|
||||||
|
|
||||||
cp -f war-and-peace.txt nuked.tmp
|
read -r -n 1 -p "Press any key to run: chmod -v 666 whey.tmp: "
|
||||||
|
echo 1>&2
|
||||||
|
chmod -v 666 whey.tmp
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
if [[ ! -x makeholes ]]; then
|
||||||
|
read -r -n 1 -p "Press any key to run: make makeholes: "
|
||||||
|
echo 1>&2
|
||||||
|
make makeholes
|
||||||
|
echo 1>&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./makeholes -n 1000 whey.tmp: "
|
||||||
|
echo 1>&2
|
||||||
|
./makeholes -n 1000 whey.tmp
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./prog curds.tmp whey.tmp (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
./prog curds.tmp whey.tmp | less -rEXFK
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./avgtime.sh 100 ./prog curds.tmp whey.tmp: "
|
||||||
|
echo 1>&2
|
||||||
|
./avgtime.sh 100 ./prog curds.tmp whey.tmp
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: cp -vf war-and-peace.txt nuked.tmp: "
|
||||||
|
echo 1>&2
|
||||||
|
cp -vf war-and-peace.txt nuked.tmp
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./makeholes -c'~' -n 1000 nuked.tmp: "
|
||||||
|
echo 1>&2
|
||||||
./makeholes -c'~' -n 1000 nuked.tmp
|
./makeholes -c'~' -n 1000 nuked.tmp
|
||||||
./prog war-and-peace.txt nuked.tmp
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./prog war-and-peace.txt nuked.tmp (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
./prog war-and-peace.txt nuked.tmp | less -rEXFK
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./avgtime.sh 100 ./prog war-and-peace.txt nuked.tmp: "
|
||||||
|
echo 1>&2
|
||||||
./avgtime.sh 100 ./prog war-and-peace.txt nuked.tmp
|
./avgtime.sh 100 ./prog war-and-peace.txt nuked.tmp
|
||||||
|
echo 1>&2
|
||||||
Reference in new issue
Block a user