view more/test.sh @ 1470:95f662f66fe4

Add "host" target to more/test.sh in case somebody doesn't want any target loaded.
author Rob Landley <rob@landley.net>
date Tue, 06 Dec 2011 08:25:48 -0600
parents a96e0dd0dc33
children
line wrap: on
line source

#!/bin/bash

# Run a command with sources/include.sh and an architecture loaded

if [ $# -eq 0 ]
then
  echo "Usage: [STAGE_NAME=...] more/test.sh ARCH COMMAND..." >&2
  exit 1
fi

. sources/include.sh || exit 1

[ "$1" != "host" ] && NO_CLEANUP=1 load_target "$1"
shift
eval "$@"