Mercurial > hg > aboriginal
annotate more/for-each-target.sh @ 1509:c8fac8498b66
Revert debug code accidentally checked in.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 21 Mar 2012 17:45:39 -0500 |
parents | f8c41d637b7b |
children | 3a213739ee1c |
rev | line source |
---|---|
1114
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/bin/bash |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 # Iterate through every target architecture, running rest of command line |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 # on each $TARGET. |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 # If $FORK is set, run them in parallel with filtered output. |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 |
1273
dadbb8873a36
functions.sh no longer includes utility-functions.sh, so adjust includes.
Rob Landley <rob@landley.net>
parents:
1157
diff
changeset
|
8 . sources/utility_functions.sh || exit 1 |
1114
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 [ -z "${ARCHES}" ] && |
1398
b74d36876c0a
Replace read_arch_dir with load_target, which understands that sources/targets/$TARGET can be a file or a directory.
Rob Landley <rob@landley.net>
parents:
1273
diff
changeset
|
11 ARCHES="$(ls sources/targets)" |
1114
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 for TARGET in $ARCHES |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 do |
1408
096ac2dfb9bd
First attempt at for-each-target didn't work with the new layout due to really stupid bug.
Rob Landley <rob@landley.net>
parents:
1398
diff
changeset
|
15 [ ! -f "sources/targets/$TARGET" ] && continue |
1444
f8c41d637b7b
Announce current target in more/for-each-target.sh
Rob Landley <rob@landley.net>
parents:
1408
diff
changeset
|
16 announce "$TARGET running" |
1114
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 maybe_fork "$* | maybe_quiet" |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 done |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 |
be94bf38648b
Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
20 wait |