runtc 436 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. set -eu
  3. . common
  4. set -- ${cli_runtc:-} "$@"
  5. while getopts a:gh OPT; do
  6. case "$OPT" in
  7. a)
  8. arch="$OPTARG"
  9. ;;
  10. h)
  11. printf "Usage: $0 TOOL [TOOL_ARGS]...
  12. Call a built ToolChain tool. Example:
  13. $0 -a arm readelf -h
  14. " 2>&1
  15. exit 0
  16. ;;
  17. esac
  18. done
  19. shift "$(($OPTIND - 1))"
  20. tool="$1"
  21. shift
  22. set_common_vars "$arch"
  23. "${buildroot_out_dir}/host/bin/"*-buildroot-*"${tool}" "$@"
  24. exit "$?"