mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 12:04:27 +01:00
run: use getopt
This commit is contained in:
13
rungdb-user
13
rungdb-user
@@ -1,18 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
|
||||
gem5_opt=
|
||||
while getopts "h${common_getopts_flags}" OPT; do
|
||||
case "$OPT" in
|
||||
parsed=$(getopt -o "h${common_getopt_flags}" -l "$common_getopt_flags_long" -- "$@")
|
||||
eval set -- "$parsed"
|
||||
while true; do
|
||||
case "$1" in
|
||||
h)
|
||||
echo "$0 <exec-relative-path> [<brk-symbol>]"
|
||||
echo "$0 <exec-relative-path> [<brk-symbol>]" 2>&1
|
||||
exit
|
||||
;;
|
||||
?)
|
||||
common_getopts_case "$OPT"
|
||||
*)
|
||||
common_getopt_case "$@"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift "$(($OPTIND - 1))"
|
||||
executable_rel="$1"
|
||||
shift
|
||||
if [ "$#" -gt 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user