3
# Update compiler links to ccache (in /usr/local/bin)
5
# The idea is that /usr/local/bin is ahead of /usr/bin in your PATH, so adding
6
# the link /usr/local/bin/cc -> /usr/bin/ccache means that it is run instead of
9
# Written by: Behan Webster <behanw@websterwood.com>
12
DIRECTORY=/usr/local/bin
13
CCACHE=/usr/bin/ccache
17
echo "Usage: `basename $0` [--directory <dir>] [--remove]"
21
while [ $# -gt 0 ] ; do
23
-d*|--d*|--directory) DIRECTORY=$2; shift; shift;;
24
-h*|--h*|--help) usage;;
25
-r*|--r*|--remove) REMOVE=1; shift;;
26
-t*|--t*|--test) TEST=echo; shift;;
30
for FILE in `cd $CCDIR; ls` ; do
32
if [ -z "$REMOVE" ] ; then
34
$TEST ln -fs $CCACHE $LINK
37
if [ -L "$LINK" ] ; then