mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
common: factor out common opts to all scripts
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
|
||||
common_gem5=true
|
||||
while getopts a:hs: OPT; do
|
||||
while getopts "h${common_getopts_flags}" OPT; do
|
||||
case "$OPT" in
|
||||
a)
|
||||
common_arch="$OPTARG"
|
||||
;;
|
||||
h)
|
||||
printf "\
|
||||
usage: $0 [-a arch] [stat=system.cpu.numCycles]
|
||||
@@ -13,6 +10,9 @@ Get the value for a gem5 stat from the stats.txt file.
|
||||
" 1>&2
|
||||
exit
|
||||
;;
|
||||
?)
|
||||
common_getopts_case "$OPT"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift "$(($OPTIND - 1))"
|
||||
|
||||
Reference in New Issue
Block a user