output messages to stderr

main
Geert Stappers 13 years ago committed by josch
parent a4c383bfd0
commit 94230780a8

@ -26,13 +26,13 @@
set -ex set -ex
usage() { usage() {
echo "Usage: $0: [-s suite] [-a arch] [-d directory] [-m mirror] [-p packages] platform\n" echo "Usage: $0: [-s suite] [-a arch] [-d directory] [-m mirror] [-p packages] platform\n" >&2
} }
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C
if [ "$FAKEROOTKEY" = "" ]; then if [ "$FAKEROOTKEY" = "" ]; then
echo "re-executing script inside fakeroot" echo "re-executing script inside fakeroot" >&2
fakeroot "$0" "$@"; fakeroot "$0" "$@";
exit exit
fi fi
@ -49,12 +49,12 @@ while getopts s:a:d:m:p: opt; do
done done
shift $(($OPTIND - 1)) shift $(($OPTIND - 1))
[ "$#" -ne 1 ] && { echo "too many positional arguments"; usage; exit 1; } [ "$#" -ne 1 ] && { echo "too many positional arguments" >&2; usage; exit 1; }
PLATFORM="$1" PLATFORM="$1"
[ ! -r "$PLATFORM" ] && { echo "cannot find target directory: $PLATFORM"; exit 1; } [ ! -r "$PLATFORM" ] && { echo "cannot find target directory: $PLATFORM" >&2; exit 1; }
[ ! -r "$PLATFORM/multistrap.conf" ] && { echo "cannot read multistrap config: $PLATFORM/multistrap.conf"; exit 1; } [ ! -r "$PLATFORM/multistrap.conf" ] && { echo "cannot read multistrap config: $PLATFORM/multistrap.conf" >&2; exit 1; }
# source default options # source default options
. "default/config" . "default/config"
@ -81,16 +81,16 @@ fi
# binutils must always be installed for objdump for fake ldd # binutils must always be installed for objdump for fake ldd
PACKAGES="$PACKAGES binutils" PACKAGES="$PACKAGES binutils"
echo "--------------------------" echo "--------------------------" >&2
echo "suite: $SUITE" echo "suite: $SUITE" >&2
echo "arch: $ARCH" echo "arch: $ARCH" >&2
echo "rootdir: $ROOTDIR" echo "rootdir: $ROOTDIR" >&2
echo "mirror: $MIRROR" echo "mirror: $MIRROR" >&2
echo "pkgs: $PACKAGES" echo "pkgs: $PACKAGES" >&2
echo "--------------------------" echo "--------------------------" >&2
[ -e "$ROOTDIR.tar" ] && { echo "tarball still exists"; exit 1; } [ -e "$ROOTDIR.tar" ] && { echo "tarball still exists" >&2; exit 1; }
[ -e "$ROOTDIR" ] && { echo "root directory still exists"; exit 1; } [ -e "$ROOTDIR" ] && { echo "root directory still exists" >&2; exit 1; }
# create multistrap.conf # create multistrap.conf
MULTISTRAPCONF=`tempfile -d . -p multistrap` MULTISTRAPCONF=`tempfile -d . -p multistrap`
@ -121,7 +121,7 @@ if [ $ARCH != "`dpkg --print-architecture`" ]; then
armel) cp `which qemu-arm-static` $ROOTDIR/usr/bin;; armel) cp `which qemu-arm-static` $ROOTDIR/usr/bin;;
lpia) cp `which qemu-i386-static` $ROOTDIR/usr/bin;; lpia) cp `which qemu-i386-static` $ROOTDIR/usr/bin;;
powerpc) cp `which qemu-ppc-static` $ROOTDIR/usr/bin;; powerpc) cp `which qemu-ppc-static` $ROOTDIR/usr/bin;;
*) echo "unknown architecture: $ARCH"; exit 1;; *) echo "unknown architecture: $ARCH" >&2; exit 1;;
esac esac
fi fi

Loading…
Cancel
Save