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

View File

@@ -1,16 +1,10 @@
#!/usr/bin/env bash
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
common_gem5=true
while getopts M:n: OPT; do
while getopts "${common_getopts_flags}" OPT; do
case "$OPT" in
M)
common_gem5_variant="$OPTARG"
;;
n)
common_run_id="$OPTARG"
;;
?)
exit 2
common_getopts_case "$OPT"
;;
esac
done