From: Ulrich Dangel Date: Sat, 12 Feb 2011 13:33:07 +0000 (+0100) Subject: Print warning if grml2usb is not found in grml2iso. X-Git-Tag: v0.9.31~5 X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=a9ab0bfbcc7ff337d8439f3420e539d7a9ddeb6b Print warning if grml2usb is not found in grml2iso. Added helper message for running grml2iso from the source tree. --- diff --git a/grml2iso b/grml2iso index 8e4e06a..8a07f1a 100755 --- a/grml2iso +++ b/grml2iso @@ -83,8 +83,6 @@ Options: echo "Error: specified parameter for -c is not a directory" >&2 exit 1 fi - - shift $(($OPTIND - 1)) # }}} # we need root permissions for executing grml2usb {{{ @@ -94,6 +92,17 @@ Options: fi # }}} +# check for grml2usb {{{ + if [ ! -x "$(which $GRML2USB)" ] || [ ! -x "$GRML2USB" ] ; then + echo >&2 "Error: Could not find grml2usb" + if [ -x "./$GRML2USB" ] ; then + echo >&2 "If you executed grml2iso from the grml2usb repository use" + echo >&2 "GRML2USB=./grml2usb $0 $*" + fi + exit 1 + fi +# }}} + # variables {{{ ORIG_DIR="$(pwd)" # note: grub-pc_1.96+20090603-1 seems to be b0rken @@ -113,9 +122,13 @@ Options: # }}}} # execute grml2usb with all ISOs you'd like to install {{{ + # remove all parameters + shift $(($OPTIND - 1)) + $GRML2USB "${REMOVE_OPTS[@]}" ${ADD_OPTS:+"$ADD_OPTS"} "$@" "$WRKDIR/cddir" # }}} + # move syslinux to isolinux {{{ mv "$WRKDIR"/cddir/boot/syslinux "$WRKDIR"/cddir/boot/isolinux