diff options
author | Jan Blunck <jblunck@infradead.org> | 2014-07-16 09:12:56 -0700 |
---|---|---|
committer | Jan Blunck <jblunck@infradead.org> | 2014-07-16 09:12:56 -0700 |
commit | f8436e76f6ca6cb957eec917c67815c5248820e6 (patch) | |
tree | 3a50ac05614d6da5cd4435c277b8daff2289961d /build-recipe-livebuild | |
parent | c0285a0b01f189a9eb0af9857875acee91be5f46 (diff) |
livebuild: Make LIVEBUILD_ROOT a variable
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Diffstat (limited to 'build-recipe-livebuild')
-rw-r--r-- | build-recipe-livebuild | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/build-recipe-livebuild b/build-recipe-livebuild index dc9dfad..cb017b8 100644 --- a/build-recipe-livebuild +++ b/build-recipe-livebuild @@ -111,12 +111,13 @@ EOF # Variables: # $BUILD_ROOT the Debian chroot # $TOPDIR/SOURCES includes the live-build config tarball -# $TOPDIR/LIVEBUILD_ROOT where live-build will be called +# $TOPDIR/$LIVEBUILD_ROOT where live-build will be called # $RECIPEFILE the name of the live-build config tarball recipe_build_livebuild() { local ARCH=$(chroot $BUILD_ROOT su -c "dpkg-architecture -qDEB_BUILD_ARCH") local DIST=$(chroot $BUILD_ROOT su -c "lsb_release --codename" | awk '{ print $2 }') + local LIVEBUILD_ROOT="LIVEBUILD_ROOT" [ -z "${ARCH}" -o -z "${DIST}" ] && cleanup_and_exit 1 @@ -148,17 +149,17 @@ LB_MIRROR_DEBIAN_INSTALLER="file:/.build.binaries/" LB_APT_SECURE="false" EOF - # Expand live-build configuration to $TOPDIR/LIVEBUILD_ROOT + # Expand live-build configuration to $TOPDIR/$LIVEBUILD_ROOT echo "Expanding live-build configuration" tar -xvf $BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE \ - -C $BUILD_ROOT/$TOPDIR/LIVEBUILD_ROOT || cleanup_and_exit 1 + -C $BUILD_ROOT/$TOPDIR/$LIVEBUILD_ROOT || cleanup_and_exit 1 # Sanity check to not configure archives inside configuration - local files=($BUILD_ROOT/$TOPDIR/LIVEBUILD_ROOT/config/archives/*) + local files=($BUILD_ROOT/$TOPDIR/$LIVEBUILD_ROOT/config/archives/*) [ ${#files[@]} -gt 0 ] && cleanup_and_exit 1 # TODO: Add the repository public key - # cp ... $BUILD_ROOT/$TOPDIR/LIVEBUILD_ROOT/config/archives/debian.key + # cp ... $BUILD_ROOT/$TOPDIR/$LIVEBUILD_ROOT/config/archives/debian.key if [ -x $BUILD_ROOT/usr/lib/build/livebuild_pre_run ] ; then echo "Running OBS build livebuild_pre_run hook" @@ -176,11 +177,11 @@ EOF < /dev/null || cleanup_and_exit 1 fi - chroot $BUILD_ROOT su -c "cd $TOPDIR/LIVEBUILD_ROOT && lb build" - root \ + chroot $BUILD_ROOT su -c "cd $TOPDIR/$LIVEBUILD_ROOT && lb build" - root \ < /dev/null || cleanup_and_exit 1 # Move created product to destination - for i in $BUILD_ROOT/$TOPDIR/LIVEBUILD_ROOT/* ; do + for i in $BUILD_ROOT/$TOPDIR/$LIVEBUILD_ROOT/* ; do test -f "$i" || continue case "${i##*/}" in *.iso) |