New function check_for_xorriso in releng_getopts.inc

master
Thomas Schmitt 12 years ago
parent c394fe3ea2
commit 73cfce131d
  1. 31
      releng/inc/releng_getopts.inc
  2. 6
      releng/manual_devices

@ -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=

@ -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() {

Loading…
Cancel
Save