view run-from-build.sh @ 636:d658f28e36ae

Move adding /sbin to $PATH to run-from-build.sh. My reasoning is that run-emulator.sh only needs mke2fs/tune2fs when called with --make-hdb, but run-from-build.sh needs either that or e2fsck all the time.
author Rob Landley <rob@landley.net>
date Wed, 18 Mar 2009 19:58:26 -0500
parents 518c8e257b3d
children 950ef7de1cf9
line wrap: on
line source

#!/bin/bash

SAVEPATH="$PATH"
source sources/include.sh

# Some distros don't put /sbin:/usr/sbin in the $PATH for non-root users.
export PATH="$SAVEPATH"
[ -z "$(which mke2fs)" ] && PATH=/sbin:/usr/sbin:$PATH

cd "${BUILD}/system-image-$ARCH_NAME" || exit 1

# A little paranoia.
[ -f "image-${ARCH}.ext2" ] && fsck.ext2 -y "image-${ARCH}.ext2" </dev/null

# And run it, using the distccd we built (if necessary) and the cross-compiler.

PATH="$HOSTTOOLS:$PATH" ./run-emulator.sh --make-hdb 2048 --memory 256 \
	--with-distcc "${BUILD}/cross-compiler-${ARCH}"