Debian Codegraph @

CCache/debian/update-ccache

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 #
3 # Update compiler links to ccache (in /usr/local/bin)
4 #
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
7 # /usr/bin/cc
8 #
9 # Written by: Behan Webster <[email protected]>
10 #
11
12 DIRECTORY=/usr/local/binscip-shell filesystem . . `/usr/local/bin`.
13 CCACHE=/usr/bin/ccachescip-shell filesystem . . `/usr/bin/ccache`.
14 CCDIR=/usr/lib/ccachescip-shell filesystem . . `/usr/lib/ccache`.
15
16 usagescip-shell shell swig 4.4.1-2 usage().() {
17 echoscip-shell system . . echo. "Usage: `basenamescip-shell system . . basename. $0` [--directory <dir>] [--remove]"
18 exit 0
19 }
20
21 while [scip-shell system . . `[`. $# -gt 0 ] ; do
22 case "$1" in
23 -d*|--d*|--directory) DIRECTORY=$2; shift; shift;;
24 -h*|--h*|--help) usagescip-shell shell swig 4.4.1-2 usage().;;
25 -r*|--r*|--remove) REMOVE=1; shift;;
26 -t*|--t*|--test) TEST=echo; shift;;
27 esac
28 done
29
30 for FILE in `cd $CCDIR; lsscip-shell system . . ls.` ; do
31 LINK=$DIRECTORY/$FILE
32 if [scip-shell system . . `[`. -z "$REMOVE" ] ; then
33 # Add link
34 $TEST ln -fs $CCACHE $LINK
35 else
36 # Remove link
37 if [scip-shell system . . `[`. -L "$LINK" ] ; then
38 $TEST rm -f $LINK
39 fi
40 fi
41 done
42
43 # vim: sw=4 ts=4