Skip to content
Snippets Groups Projects
Commit f36fe1f4 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

Import: extend help function by defaults

parent bf6cffee
No related branches found
No related tags found
No related merge requests found
......@@ -2,16 +2,19 @@
BINDIR=$(dirname $0)
#% help
BUILD_SUBDIR=
IGNORE_ERRORS=false
HELP=false
INTAKE_ONLY=false
SLURM_JOB_CPUS_PER_NODE=256
DEBUG=false
#% endhelp
while getopts b:B:d:D:e:Ehis:t:c:x OPTOPT
do
case $OPTOPT in
#% help
b) BUILD_SUBDIR=$OPTARG ;;
B) BUILD_DIR=$OPTARG ;;
d) DATA_BASE_DIR=$OPTARG ;;
......@@ -24,6 +27,7 @@ do
t) EXP_TYPE=$OPTARG ;;
c) SLURM_JOB_CPUS_PER_NODE=$OPTARG ;;
x) DEBUG=true ;;
#% endhelp
*) exit 1;;
esac
done
......@@ -31,7 +35,7 @@ shift $((OPTIND -1))
if $HELP
then
awk '/case \$OPTOPT/,/esac/ {print}' $0
awk '/^[ \t]*#%[ \t]*endhelp[ \t]*$/ {PRINT=0}; PRINT {print}; /^[ \t]*#%[ \t]*help[ \t]*$/ {PRINT=1}' $0
exit
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment