New function check_for_xorriso in releng_getopts.inc
This commit is contained in:
parent
8841bcfca7
commit
00fc9608cb
@ -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…
Reference in New Issue
Block a user