Files
linux-kernel-module-cheat/runtc
Ciro Santilli 1cb056a995 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.
2018-08-09 06:59:52 +01:00

26 lines
487 B
Bash
Executable File

#!/usr/bin/env bash
set -eu
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
set -- ${cli_runtc:-} "$@"
while getopts a:gh OPT; do
case "$OPT" in
a)
common_arch="$OPTARG"
;;
h)
printf "Usage: $0 TOOL [TOOL_ARGS]...
Call a built ToolChain tool. Example:
$0 -a arm readelf -h
" 2>&1
exit 0
;;
esac
done
shift "$(($OPTIND - 1))"
tool="$1"
shift
common_setup
"${common_buildroot_out_dir}/host/bin/"*-buildroot-*"${tool}" "$@"
exit "$?"