fakecc.sh 523 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/usr/bin/env bash

# The actual binary we substitute is the first argument
BINARY=${1}
shift

# All other options are supplied by the calling context
while test $# -gt 0
do
    case ${1} in
        -c)  # Compile artifacts - e.g. do nothing
            exit 0
            ;;
        -o)  # Remember the outfile in case we link
sebastian.graf's avatar
sebastian.graf committed
15
            shift
16 17 18 19 20 21 22 23 24 25 26
            OUTFILE=${1}
            ;;
        *) # Just ignore other options
            ;;
    esac
    shift
done

#echo ${BINARY}
#echo ${OUTFILE}
cp ${BINARY} ${OUTFILE}