Mercurial > hg > control-images
view common/include.sh @ 6:dc3d5c66e336
The perl build is crazy, and if you have a /bin/mips it tries to run it to see if it's building on an obsolete OS called "mips" rather than Linux. Except that util-linux-ng does a mips alias for setarch, which runs /bin/sh by default if given no arguments, which sits there awaiting input, and the build hangs. Fix: feed it /dev/null.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 17 Sep 2011 00:53:33 -0500 |
parents | 1a7e1616ab9d |
children | 63663cdfbe32 |
line wrap: on
line source
#!/bin/bash # Grab common shell functions source common/utility_functions.sh || exit 1 source common/download_functions.sh || exit 1 # Figure out where everything is: [ -z "$TOP" ] && TOP="$(pwd)" [ -z "$BUILD" ] && BUILD="$TOP/build" # what directory is this script in, and what's that directory called? [ -z "$MYDIR" ] && MYDIR="$(readlink -f "$(dirname "$(which "$0")")")" [ -z "$IMAGENAME" ] && IMAGENAME="${MYDIR/*\//}" # Directories for downloaded source tarballs and patches. [ -z "$PATCHDIR" ] && PATCHDIR="$MYDIR/patches" [ -z "$SRCDIR" ] && SRCDIR="$TOP/packages/$IMAGENAME" mkdir -p "$SRCDIR" || dienow # Put package cache in the control image, so the target system image can # build from this source. WORK="$TOP/build/$IMAGENAME" && SRCTREE="$WORK" && blank_tempdir "$WORK" && squash_image() { # Create squashfs image if [ ! -z "$(which mksquashfs)" ] then mksquashfs "$WORK" "$WORK.hdc" -noappend -all-root || dienow else echo "No mksquashfs in path" fi }