view more/for-each-target.sh @ 1408:096ac2dfb9bd

First attempt at for-each-target didn't work with the new layout due to really stupid bug.
author Rob Landley <rob@landley.net>
date Sun, 03 Jul 2011 13:09:48 -0500
parents b74d36876c0a
children f8c41d637b7b
line wrap: on
line source

#!/bin/bash

# Iterate through every target architecture, running rest of command line
# on each $TARGET.

# If $FORK is set, run them in parallel with filtered output.

. sources/utility_functions.sh || exit 1

[ -z "${ARCHES}" ] &&
  ARCHES="$(ls sources/targets)"

for TARGET in $ARCHES
do
  [ ! -f "sources/targets/$TARGET" ] && continue
  maybe_fork "$* | maybe_quiet"
done

wait