Browse Source

Cleanup info print in build tool

master
cancel 6 years ago
parent
commit
e579183070
  1. 17
      tool

17
tool

@ -180,6 +180,15 @@ build_target() {
verbose_echo "$compiler_exe" "${compiler_flags[@]}" -o "$build_dir/$build_subdir/$out_exe" "${source_files[@]}" ${libraries[@]+"${libraries[@]}"} verbose_echo "$compiler_exe" "${compiler_flags[@]}" -o "$build_dir/$build_subdir/$out_exe" "${source_files[@]}" ${libraries[@]+"${libraries[@]}"}
} }
print_info() {
cat <<EOF
Operating system: $os
Compiler name: $compiler_exe
Compiler type: $cc_id
Compiler version: $compiler_vers
EOF
}
shift $((OPTIND - 1)) shift $((OPTIND - 1))
if [[ -z "${1:-}" ]]; then if [[ -z "${1:-}" ]]; then
@ -190,10 +199,10 @@ fi
case "$1" in case "$1" in
info) info)
echo "OS: $os" if [[ "$#" -gt 1 ]]; then
echo "Compiler name: $compiler_exe" fatal "Too many arguments for 'info'"
echo "Compiler type: $cc_id" fi
echo "Compiler version: $compiler_vers" print_info
exit 0 exit 0
;; ;;
build) build)

Loading…
Cancel
Save