From a9ab0bfbcc7ff337d8439f3420e539d7a9ddeb6b Mon Sep 17 00:00:00 2001 From: Ulrich Dangel Date: Sat, 12 Feb 2011 14:33:07 +0100 Subject: [PATCH] Print warning if grml2usb is not found in grml2iso. Added helper message for running grml2iso from the source tree. --- grml2iso | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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 -- 2.1.4