view build.sh @ 281:d5cda5597722

Back out part of 276, make host-tools not delete symlinks to avoid opening a race window where starting a new ./build.sh might screw up an existing one.
author Rob Landley <rob@landley.net>
date Thu, 31 Jan 2008 01:23:18 -0600
parents b2e353ae7566
children 1782b77fae15
line wrap: on
line source

#!/bin/bash

# If run with no arguments, list architectures.

if [ $# -eq 0 ]
then
  echo "Usage: $0 ARCH [ARCH...]"
  ./include.sh
  exit 1
fi

# Download source code and build host tools.

./download.sh || exit 1

# host-tools populates one directory with every command the build needs,
# so we can ditch the old $PATH afterwards.

time ./host-tools.sh || exit 1
PATH=`pwd`/build/host
[ -f "$PATH"/toybox ] || exit 1

# Run the steps in order for each architecture listed on the command line
for i in "$@"
do
  echo "=== Building ARCH $i"
  time ./cross-compiler.sh $i || exit 1
  echo "=== native ($i)"
  time ./mini-native.sh $i || exit 1
  time ./package-mini-native.sh $i || exit 1
done