Instantly share code, notes, and snippets.

View as
#!/bin/sh
HAS_INPUT_FILE=0
ARGS=$@
ARGS=$(echo $ARGS | perl -pe 's/-I.*?(\s-[^I])/\1/')
while [ $# -ne 0 ]; do
ARG=$1
# Skip options
if [ "$ARG" == "-arch" ] || [ "$ARG" == "-o" ]; then
# Skip next token
shift