Mercurial > hg > control-images
view common/include.sh @ 29:f3e1afd794a5
The zlib developers remove each old version as the new one as released, to discourage people from using it (I.E. zlib). Remind me to copy the mirroring architecture into the control image shared infrastructure.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 10 Jun 2012 20:30:25 -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 }