diff --git a/libisoburn/trunk/releng/inc/releng_getopts.inc b/libisoburn/trunk/releng/inc/releng_getopts.inc index 516d7ad4..ed53da99 100644 --- a/libisoburn/trunk/releng/inc/releng_getopts.inc +++ b/libisoburn/trunk/releng/inc/releng_getopts.inc @@ -83,6 +83,37 @@ cleanup() { fi } +check_for_xorriso() { + # $1: if "-x" then check executability + + if test -z "$RELENG_XORRISO" -o "$RELENG_XORRISO" = "0" + then + print_help + print_specific_help + echo "${SELF}: Need -x absolute or relative path to binary to be run." + echo + exit 31 + fi + if [ x"$1" = x"-x" -a ! -x "$RELENG_XORRISO" ] + then + print_help + print_specific_help + echo "${SELF}: Path given by option -x does not lead to an executable file." + echo "Given is: '$RELENG_XORRISO'" + if test "$RELENG_XORRISO" = "xorriso" + then + xorriso=$(type -p xorriso) + if test -n "xorriso" + then + echo "Hint: Try '$xorriso'" + fi + fi + echo + exit 31 + fi +} + + ############################################# next_is= diff --git a/libisoburn/trunk/releng/manual_devices b/libisoburn/trunk/releng/manual_devices index 6c3a9c07..bf091567 100755 --- a/libisoburn/trunk/releng/manual_devices +++ b/libisoburn/trunk/releng/manual_devices @@ -62,11 +62,7 @@ do done # Insist in having a xorriso -if [ ! -x "$RELENG_XORRISO" ]; then - print_help - printf "\n${SELF}: -x absolute or relative path to binary to be run.\n\n" - exit 31 -fi +check_for_xorriso -x # get_speeds() {