common: simplify set_common_vars, rename to common_setup

Don't pass all arguments explicitly, just use existing vars.

Prefix all common_setup inputs and outputs with common_ to avoid name conflicts.
This commit is contained in:
Ciro Santilli
2018-08-09 05:44:52 +01:00
parent b8abb15ca7
commit 1cb056a995
16 changed files with 192 additions and 200 deletions

6
runtc
View File

@@ -5,7 +5,7 @@ set -- ${cli_runtc:-} "$@"
while getopts a:gh OPT; do
case "$OPT" in
a)
arch="$OPTARG"
common_arch="$OPTARG"
;;
h)
printf "Usage: $0 TOOL [TOOL_ARGS]...
@@ -20,6 +20,6 @@ done
shift "$(($OPTIND - 1))"
tool="$1"
shift
set_common_vars "$arch"
"${buildroot_out_dir}/host/bin/"*-buildroot-*"${tool}" "$@"
common_setup
"${common_buildroot_out_dir}/host/bin/"*-buildroot-*"${tool}" "$@"
exit "$?"