2 # Copyright (C) 2011 Andreas Waidler <arandes@programmers.at>
4 # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
5 # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7 # 0. You just DO WHAT THE FUCK YOU WANT TO.
13 (cat "$1" | ..
/src
/agg
)
15 if [ $res -ne 0 ]; then
16 echo "Failed to run agg ($res)."
23 (cat "$1" | ..
/src
/agg
)
25 if [ $res -eq 0 ]; then
26 echo "Failed to fail running agg."
33 find "$1" -mindepth 1 \
36 -exec ..
/src
/nomtime
"rm -rf" '{}' \
;
38 if [ $res -ne 0 ]; then
39 echo "Failed to run nomtime."
46 printf " %-32s: " "$1"
49 if [ $result -ne 0 ]; then
57 function assert_exists
() { [ -d "$1" ]; }
58 function assert_date
() { [ `stat -c %Y "$1"` = "$2" ]; }
59 function assert_empty
() { [ `ls "$1" | wc -l` = "0" ]; }
60 function assert_missing
() { [ ! -e "$1" ]; }
61 # BUG: "`cat`" drops trailing \n.
62 function assert_value
() { [ "`cat \"$1/$2\"`" = "$3" ]; }
63 function assert_delete
() {
64 BASENAME
="`dirname "$1"`"
65 OLD_DATE
="`stat -c %Y "$BASENAME"`"
66 ..
/src
/nomtime
"rm -rf" "$1"
67 assert_date
"$BASENAME" "$OLD_DATE"