fakecc.sh 524 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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
            shift 
            OUTFILE=${1}
            ;;
        *) # Just ignore other options
            ;;
    esac
    shift
done

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