View Single Post
Old Oct 21st, 2006, 2:57 PM   #2
iradic
Programmer
 
Join Date: Feb 2006
Posts: 36
Rep Power: 0 iradic is on a distinguished road
And here is some more "funny" stuff...

Bash debug output:

$ cp copy Makefile

$ mage.sh -u *.c > new
Makefile -> /tmp/_mage.sh.1144.mak
++ grep -q '^dlist[$](OBJ):' /tmp/_mage.sh.1144.mak
+ echo 0
0
+ set +o xtrace
old file: dlist.c
++ grep -q '^filter[$](OBJ):' /tmp/_mage.sh.1144.mak
+ echo 0
0
+ set +o xtrace
old file: filter.c
++ grep -q '^getaline[$](OBJ):' /tmp/_mage.sh.1144.mak
+ echo 0
0
+ set +o xtrace
old file: getaline.c
++ grep -q '^hash[$](OBJ):' /tmp/_mage.sh.1144.mak
+ echo 1
1
+ set +o xtrace
new file: hash.c
++ grep -q '^main[$](OBJ):' /tmp/_mage.sh.1144.mak
+ echo 0
0
+ set +o xtrace
old file: main.c
++ grep -q '^memdbg[$](OBJ):' /tmp/_mage.sh.1144.mak
+ echo 0
0
+ set +o xtrace
old file: memdbg.c
++ grep -q '^parser[$](OBJ):' /tmp/_mage.sh.1144.mak
+ echo 0
0
+ set +o xtrace
old file: parser.c

$ cp copy Makefile

$ mage.sh -u *.c > Makefile
Makefile -> /tmp/_mage.sh.996.mak
++ grep -q '^dlist[$](OBJ):' /tmp/_mage.sh.996.mak
+ echo 1
1
+ set +o xtrace
new file: dlist.c
++ grep -q '^filter[$](OBJ):' /tmp/_mage.sh.996.mak
+ echo 1
1
+ set +o xtrace
new file: filter.c
++ grep -q '^getaline[$](OBJ):' /tmp/_mage.sh.996.mak
+ echo 1
1
+ set +o xtrace
new file: getaline.c
++ grep -q '^hash[$](OBJ):' /tmp/_mage.sh.996.mak
+ echo 1
1
+ set +o xtrace
new file: hash.c
++ grep -q '^main[$](OBJ):' /tmp/_mage.sh.996.mak
+ echo 1
1
+ set +o xtrace
new file: main.c
++ grep -q '^memdbg[$](OBJ):' /tmp/_mage.sh.996.mak
+ echo 1
1
+ set +o xtrace
new file: memdbg.c
++ grep -q '^parser[$](OBJ):' /tmp/_mage.sh.996.mak
+ echo 1
1
+ set +o xtrace
new file: parser.c

I have put script in the attachment.
Attached Files
File Type: txt mage.sh.txt (7.5 KB, 19 views)
iradic is offline   Reply With Quote