equal
deleted
inserted
replaced
12 $ cat > "$TESTTMP/waitlock_editor.sh" <<EOF |
12 $ cat > "$TESTTMP/waitlock_editor.sh" <<EOF |
13 > [ -n "\${WAITLOCK_ANNOUNCE:-}" ] && touch "\${WAITLOCK_ANNOUNCE}" |
13 > [ -n "\${WAITLOCK_ANNOUNCE:-}" ] && touch "\${WAITLOCK_ANNOUNCE}" |
14 > f="\${WAITLOCK_FILE}" |
14 > f="\${WAITLOCK_FILE}" |
15 > start=\`date +%s\` |
15 > start=\`date +%s\` |
16 > timeout=5 |
16 > timeout=5 |
17 > while [ \\( ! -f \$f \\) -a \\( ! -L \$f \\) ]; do |
17 > $RUNTESTDIR/testlib/wait-on-file "\$timeout" "\$f" |
18 > now=\`date +%s\` |
|
19 > if [ "\`expr \$now - \$start\`" -gt \$timeout ]; then |
|
20 > echo "timeout: \$f was not created in \$timeout seconds (it is now \$(date +%s))" |
|
21 > exit 1 |
|
22 > fi |
|
23 > sleep 0.1 |
|
24 > done |
|
25 > if [ \$# -gt 1 ]; then |
18 > if [ \$# -gt 1 ]; then |
26 > cat "\$@" |
19 > cat "\$@" |
27 > fi |
20 > fi |
28 > EOF |
21 > EOF |
29 |
22 |