annotate forkbomb.sh @ 393:0e7fea529254

Fix RECORD_COMMANDS log path so the report_recorded_command.sh works.
author Rob Landley <rob@landley.net>
date Tue, 26 Aug 2008 17:40:39 -0500
parents f0ceae67ebd0
children 763712cce21f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
206
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 # Test script to build every target architecture, logging output.
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
4 # With --fork, it builds them in parallel
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 # With --nofork, it build them sequentially
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 # With --watch, it displays output from an existing parallel build
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
7
376
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
8 function wait4background()
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
9 {
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
10 # Wait for background task to finish
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
11 while [ $(jobs | wc -l) -ge $1 ]
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
12 do
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
13 sleep 1
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
14 # Without this next line, bash never notices a change in the number of jobs.
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
15 # Bug noticed in Ubuntu 7.04
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
16 jobs > /dev/null
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
17 done
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
18 }
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
19
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
20 # Build and package one architecture.
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
21
206
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 function buildarch()
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
23 {
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 nice -n 20 ./cross-compiler.sh $1 &&
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 nice -n 20 ./mini-native.sh $1 &&
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
26 nice -n 20 ./package-mini-native.sh $1
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
27 }
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
28
312
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
29 if [ "$1" != "--watch" ] && [ "$1" != "--stat" ]
206
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
30 then
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
31 if [ $# -ne 0 ]
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
32 then
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
33
357
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
34 if [ ! -z "$RECORD_COMMANDS" ]
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
35 then
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
36 mkdir -p build/cmdlines-host &&
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
37 export WRAPPY_LOGDIR=`pwd`/build/cmdlines-host
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
38 fi
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
39
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
40 # The first thing we need to do is download the source, build the host
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
41 # tools, and extract the source packages. This is only done once (not
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
42 # repeated for each architecure), so we do it up front here. Doing this
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
43 # multiple times in parallel would collide, which is the main reason
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
44 # you can't just run build.sh several times in parallel.
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
45
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
46 (touch .kthxbye &&
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
47 nice -n 20 ./download.sh &&
262
b2e353ae7566 Have host-tools populate build/host with 1) toybox, 2) all the remaining
Rob Landley <rob@landley.net>
parents: 258
diff changeset
48 # host-tools populates one directory with every command the build needs,
b2e353ae7566 Have host-tools populate build/host with 1) toybox, 2) all the remaining
Rob Landley <rob@landley.net>
parents: 258
diff changeset
49 # so we can ditch the old $PATH afterwards.
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
50 nice -n 20 ./host-tools.sh || exit 1
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
51
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
52 # Ordinarily the build extracts packages the first time it needs them,
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
53 # but letting multiple builds do that in parallel can collide, so
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
54 # extract them all now up front. (Adjust the path manually here so we're
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
55 # using the busybox tools rather than the host distro's to do the
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
56 # extract, just to be consistent.)
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
57 if [ -f `pwd`/build/host/busybox ]
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
58 then
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
59 PATH=`pwd`/build/host
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
60 fi
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
61 nice -n 20 ./download.sh --extract &&
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
62 rm .kthxbye) 2>&1 | tee out.txt
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
63
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
64 # Exiting from a sub-shell doesn't exit the parent shell, and because
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
65 # we piped the output of the subshell to tee, we can't get the exit code
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
66 # of the subshell. So we use a sentinel file: if it wasn't deleted, the
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
67 # build went "boing" and should stop now.
357
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
68
309
352b71189c93 Save the output of the early steps (including host-tools build) to out.txt.
Rob Landley <rob@landley.net>
parents: 299
diff changeset
69 rm .kthxbye 2>/dev/null && exit 1
206
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
70 fi
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
71
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
72 # Loop through each architecture and call "buildarch" as appropriate.
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
73
387
f0ceae67ebd0 Convert sources/configs/$ARCH files to sources/targets/$ARCH directories.
Rob Landley <rob@landley.net>
parents: 376
diff changeset
74 for i in `cd sources/targets; ls`
206
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
75 do
357
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
76
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
77 if [ ! -z "$RECORD_COMMANDS" ]
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
78 then
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
79 mkdir -p build/cmdlines-$i || exit 1
393
0e7fea529254 Fix RECORD_COMMANDS log path so the report_recorded_command.sh works.
Rob Landley <rob@landley.net>
parents: 387
diff changeset
80 export WRAPPY_LOGDIR=`pwd`/build/cmdlines-$i
357
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
81 fi
5c61d556fe0c Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents: 352
diff changeset
82
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
83 # Build sequentially.
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
84
206
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
85 if [ "$1" == "--nofork" ]
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
86 then
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
87 buildarch $i 2>&1 | tee out-$i.txt || exit 1
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
88
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
89 # Build in parallel
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
90
206
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
91 elif [ "$1" == "--fork" ]
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
92 then
376
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
93 if [ -z "$2" ]
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
94 then
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
95 (buildarch $i > out-$i.txt 2>&1 &)&
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
96 else
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
97 (buildarch $i 2>&1 | tee out-$i.txt)&
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
98 wait4background $2
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
99 fi
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
100
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
101 # Didn't understand command line arguments, dump help.
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
102
206
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
103 else
376
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
104 echo "Usage: forkbomb.sh [--fork [N]] [--nofork] [--watch] [--stat]"
312
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
105 echo -e "\t--nofork Build all targets one after another."
376
dd7632f3000c Add "--fork 3" option to avoid overwhelming the system with parallel builds.
Rob Landley <rob@landley.net>
parents: 357
diff changeset
106 echo -e "\t--fork Build N targets in parallel (omit for all, needs lots of RAM)."
312
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
107 echo -e "\t--watch Restart monitor for --nofork."
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
108 echo -e "\t--stat Grep logfiles for success/failure after build."
206
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
109 exit 1
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
110 fi
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
111 done
b328036dbdb1 Of course I'd find a way to make 2 gigs of memory in my new laptop insufficient.
Rob Landley <rob@landley.net>
parents:
diff changeset
112 fi
299
dc5f5eeea57d Fix display glitch with --nofork.
Rob Landley <rob@landley.net>
parents: 262
diff changeset
113
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
114 # Show which builds did or didn't work.
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
115
312
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
116 if [ "$1" == "--stat" ]
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
117 then
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
118 echo "Success:"
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
119 grep -l system-image- out-*.txt
312
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
120
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
121 echo "Failed:"
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
122 (ls -1 out-*.txt; grep -l system-image- out-*.txt) | sort | uniq -u
312
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
123
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
124 exit 0
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
125 fi
dd28934bb0c9 Add --stat option, plus better help text when run with no arguments.
Rob Landley <rob@landley.net>
parents: 309
diff changeset
126
352
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
127 # Show progress indicators for parallel build.
1782b77fae15 Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents: 312
diff changeset
128
299
dc5f5eeea57d Fix display glitch with --nofork.
Rob Landley <rob@landley.net>
parents: 262
diff changeset
129 if [ "$1" != "--nofork" ]
dc5f5eeea57d Fix display glitch with --nofork.
Rob Landley <rob@landley.net>
parents: 262
diff changeset
130 then
dc5f5eeea57d Fix display glitch with --nofork.
Rob Landley <rob@landley.net>
parents: 262
diff changeset
131 watch -n 3 'X=; for i in out-*.txt; do /bin/echo -e "$X$i"; X="\n"; tail -n 1 $i; done'
dc5f5eeea57d Fix display glitch with --nofork.
Rob Landley <rob@landley.net>
parents: 262
diff changeset
132 fi