X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-live;h=1fb74d072447dd336d32b4a84e9426e5c48d0aef;hb=4d3b4726affcb2492de8aadf518178c05b7f8401;hp=9e6d068ad9505310687c60c12a14a28acfb22f26;hpb=fec913b2dfe48ff3901239dcb9b23316e75418a0;p=grml-live.git diff --git a/grml-live b/grml-live index 9e6d068..1fb74d0 100755 --- a/grml-live +++ b/grml-live @@ -49,6 +49,7 @@ Usage: $PN [options, see as follows] -i name of ISO -I directory which provides files that should become part of the chroot/ISO + -n skip generation of ISO -o main output directory of the build process -q skip mksquashfs -r &2 @@ -209,7 +211,7 @@ fi # }}} # command line parsing {{{ -while getopts "a:C:c:g:i:I:o:r:s:t:v:bBFuqVz" opt; do +while getopts "a:C:c:g:i:I:o:r:s:t:v:bBFnquVz" opt; do case "$opt" in a) ARCH="$OPTARG" ;; b) BUILD_ONLY=1 ;; @@ -219,6 +221,7 @@ while getopts "a:C:c:g:i:I:o:r:s:t:v:bBFuqVz" opt; do g) GRML_NAME="$OPTARG" ;; i) ISO_NAME="$OPTARG" ;; I) CHROOT_INSTALL="$OPTARG" ;; + n) SKIP_MKISOFS=1 ;; o) OUTPUT="$OPTARG" ;; q) SKIP_MKSQUASHFS=1 ;; r) RELEASENAME="$OPTARG" ;; @@ -326,6 +329,7 @@ if [ -z "$FORCE" ] ; then [ -n "$VERBOSE" ] && echo " Using VERBOSE mode." [ -n "$UPDATE" ] && echo " Executing UPDATE instead of fresh installation." [ -n "$SKIP_MKSQUASHFS" ] && echo " Skipping creation of SQUASHFS file." + [ -n "$SKIP_MKISOFS" ] && echo " Skipping creation of ISO file." [ -n "$BUILD_ONLY" ] && echo " Executing BUILD_ONLY instead of fresh installation or UPDATE." [ -n "$BUILD_DIRTY" ] && echo " Executing BUILD_DIRTY to leave chroot untouched." echo @@ -470,7 +474,7 @@ else fi if [ -n "$UPDATE" -o -n "$BUILD_ONLY" ] ; then - if ! [ -r "$CHROOT_OUTPUT/etc/grml_version" ] ; then + if ! [ -r "$CHROOT_OUTPUT/etc/debian_version" ] ; then log "Error: does not look like you have a working chroot. Updating/building not possible." eerror "Error: does not look like you have a working chroot. Updating/building not possible. (Drop -u/-b option?)" eend 1 @@ -864,23 +868,22 @@ else # get rid of unnecessary files when building grml-small for final release: if echo "$CLASSES" | grep -q GRML_SMALL ; then - SQUASHFS_OPTIONS="$SQUASHFS_OUTPUT -e initrd.img* vmlinuz*" + SQUASHFS_OPTIONS="$SQUASHFS_OPTIONS -e initrd.img* vmlinuz*" fi - SQUASHFS_OUTPUT="$(mktemp -t grml-live.XXXXXX)" + SQUASHFS_STDERR="$(mktemp -t grml-live.XXXXXX)" + log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB" if mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/"${GRML_NAME}".squashfs \ - -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB 2>"${SQUASHFS_OUTPUT}" ; then + -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB 2>"${SQUASHFS_STDERR}" ; then echo "${GRML_NAME}.squashfs" > $BUILD_OUTPUT/live/filesystem.module log "Finished execution of stage 'squashfs' [$(date)]" einfo "Finished execution of stage 'squashfs'" ; eend 0 - rm -f "${SQUASHFS_OUTPUT}" else log "There was an error executing stage 'squashfs' [$(date)]:" - log "$(cat $SQUASHFS_OUTPUT)" + log "$(cat $SQUASHFS_STDERR)" eerror "There was an error executing stage 'squashfs':" ; eend 1 - cat "${SQUASHFS_OUTPUT}" - rm -f "${SQUASHFS_OUTPUT}" + cat "${SQUASHFS_STDERR}" bailout fi @@ -905,6 +908,9 @@ fi if [ -f "${ISO_OUTPUT}/${ISO_NAME}" -a -z "$UPDATE" -a -z "$BUILD_ONLY" -a -z "$BUILD_DIRTY" -a "$FORCE_ISO_REBUILD" = "false" ] ; then log "$ISO_OUTPUT/${ISO_NAME} exists already, skipping stage 'iso build'" ewarn "$ISO_OUTPUT/${ISO_NAME} exists already, skipping stage 'iso build'" ; eend 0 +elif [ -n "$SKIP_MKISOFS" ] ; then + log "Skipping stage 'iso build' as requested via option -n" + ewarn "Skipping stage 'iso build' as requested via option -n" ; eend 0 else mkdir -p "$ISO_OUTPUT" || bailout 6 "Problem with creating $ISO_OUTPUT for stage 'iso build'"