blob: c4471bfedf7cba2d9083b9f7d9a57197b1b42e52 (
plain)
1 #!/usr/bin/env sh
2 DIRECTORY='/usr/lib/distcc'
3 if [ ! -d "$DIRECTORY" ]; then
4 if [ -w '/usr/lib' ]; then
5 install -d "$DIRECTORY"
6 if [ $? -gt 0 ]; then
7 echo "post-install: error creating '$DIRECTORY'."
8 else
9 echo "post-install: '$DIRECTORY' created."
10 fi
11 pushd "$DIRECTORY"
12 for c in cc c++ gcc g++; do
13 if [ ! -e $c ]; then
14 ln -s ../../bin/distcc $c
15 if [ $? -gt 0 ]; then
16 echo "post-install: error creating symlink '../../bin/distcc $c'."
17 exit 1
18 else
19 echo "post-install: create symlink '../../bin/distcc $c'."
20 fi
21 fi
22 done
23 popd
24 else
25 echo "Error: no permission to write to '/usr/lib'."
26 fi
27 fi
28 # End of file
|