#!/usr/bin/env bash c=( $'\e[0m' # 0: neutral $'\e[0;30m' # 1: black $'\e[1;30m' # 2: dark gray $'\e[0;31m' # 3: red $'\e[1;31m' # 4: light red $'\e[0;32m' # 5: green $'\e[1;32m' # 6: light green $'\e[0;33m' # 7: brown $'\e[1;33m' # 8: yellow $'\e[0;34m' # 9: blue $'\e[1;34m' # 10: light blue $'\e[0;35m' # 11: purple $'\e[1;35m' # 12: light purple $'\e[0;36m' # 13: cyan $'\e[1;36m' # 14: light cyan $'\e[0;37m' # 15: light gray $'\e[1;37m' # 16: white ) shopt -s nullglob shopt -s extglob # XXX: detect or something? # XXX: gcc? otool=otool lipo=lipo ldid=ldid function has() { value=$1 shift 1 while [[ $# != 0 ]]; do if [[ $1 == ${value} ]]; then return 0 fi shift 1 done return 1 } function fatal() { echo "$(basename "$0"): $1" 1>&2 exit 1 } function usage() { echo "Usage: $(basename "$0") [