handle specific help anywhere

This commit is contained in:
George Danchev 2011-07-18 17:22:59 +00:00
parent daf7a078bd
commit ada1b1114a
7 changed files with 54 additions and 6 deletions

View File

@ -12,8 +12,16 @@ not_in_releng_exit() {
. inc/releng_getopts.inc || not_in_releng_exit
# xorriso binary is not needed for that particular test
#print_specific_help() {
# # NONE YET
#}
if test "$SPECIFIC_HELP" = 1; then
# print_specific_help
exit 0
fi
# xorriso binary is not needed for that particular test
SAMPLE_CODE_DIR=codesamples
CC=g++

View File

@ -14,6 +14,15 @@ not_in_releng_exit() {
. inc/releng_getopts.inc || not_in_releng_exit
#print_specific_help() {
# # NONE YET
#}
if test "$SPECIFIC_HELP" = 1; then
# print_specific_help
exit 0
fi
if [ ! -x $RELENG_XORRISO ]; then
print_help
printf "\n${SELF}: -x absolute or relative path to binary to be run.\n\n"

View File

@ -13,6 +13,15 @@ not_in_releng_exit() {
. inc/releng_getopts.inc || not_in_releng_exit
#print_specific_help() {
# # NONE YET
#}
if test "$SPECIFIC_HELP" = 1; then
# print_specific_help
exit 0
fi
if [ ! -x $RELENG_XORRISO ]; then
print_help
printf "\n${SELF}: -x absolute or relative path to binary to be run.\n\n"

View File

@ -13,6 +13,15 @@ not_in_releng_exit() {
# Include common bits
. inc/releng_getopts.inc || not_in_releng_exit
#print_specific_help() {
# # NONE YET
#}
if test "$SPECIFIC_HELP" = 1; then
# print_specific_help
exit 0
fi
# Each test should decide whether or not it needs
# a xorriso binary to test, since some do compilations only.
if [ ! -x $RELENG_XORRISO ]; then

View File

@ -6,7 +6,7 @@ SELF=$(basename $0)
RELENG_XORRISO=0
SIMULATE_FAILURE=0
CLEANUP=1
RELENG_PRINTED_HELP=0
SPECIFIC_HELP=0
START_DIR_DONT_CHANGE=`pwd`
GEN_DATA_DIR=releng_generated_data/${SELF}
@ -144,7 +144,7 @@ do
elif test x"$i" = x"-h"
then
print_help
RELENG_PRINTED_HELP=1
SPECIFIC_HELP=1
elif test x"$i" = x"--"
then
# Begin of private arguments for caller

View File

@ -8,7 +8,7 @@
print_specific_help() {
# Print own help text
echo "Test specific options:"
echo "Specific options:"
echo " --dev path Suppress dialog and use path as drive address."
echo "This test insists in getting a path to xorriso by option -x."
echo
@ -20,7 +20,7 @@ if test -e "$getopts_inc"
then
. "$getopts_inc"
if test "$RELENG_PRINTED_HELP" = 1
if test "$SPECIFIC_HELP" = 1
then
print_specific_help
exit 0

View File

@ -3,17 +3,30 @@
# Copyright 2011 George Danchev <danchev@spnet.net>
# Licensed under GNU GPL version 2 or later
set -e
not_in_releng_exit() {
printf "\nPlease execute the tests from releng directory.\n\n"
exit 1
}
set -e
print_specific_help() {
# Print own help text
echo "Specific options:"
echo " NONE YET"
echo
}
# Include common bits
. inc/releng_getopts.inc || not_in_releng_exit
#
printf "\n$0: FAIL: === TEPLATE === RENAME ME TO [auto|manual]_<title>\n"
if test "$SPECIFIC_HELP" = 1; then
print_specific_help
exit 0
fi
# Each test should decide whether or not it needs
# a xorriso binary to test, since some do compilations only.