common: factor out common opts to all scripts

This commit is contained in:
Ciro Santilli
2018-08-14 00:27:55 +01:00
parent 0f5c5a9912
commit 63ec42f72f
14 changed files with 84 additions and 145 deletions

16
rungdb
View File

@@ -6,14 +6,11 @@ lx_symbols="-ex 'lx-symbols ../kernel_module-1.0/' \\
"
kgdb=false
docontinue=true
while getopts A:a:b:CgkL:n:X OPT; do
while getopts "A:a:b:CgkL:n:X${common_getopts_flags}" OPT; do
case "$OPT" in
A)
after="$OPTARG"
;;
a)
common_arch="$OPTARG"
;;
b)
before="$OPTARG"
;;
@@ -21,23 +18,14 @@ while getopts A:a:b:CgkL:n:X OPT; do
# No Continue.
docontinue=false
;;
g)
common_gem5=true
;;
k)
kgdb=true
;;
L)
common_linux_variant="$OPTARG"
;;
n)
common_run_id="$OPTARG"
;;
X)
lx_symbols=
;;
?)
exit 2
common_getopts_case "$OPT"
;;
esac
done