File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,18 @@ if [[ -f "/etc/centos-release" ]]; then
1111 [ $s -eq 0 ] || exit $s
1212
1313 if [[ -d " /usr/lib64/ccache" ]]; then
14- ln -s /usr/bin/ccache /usr/lib64/ccache/c++
15- ln -s /usr/bin/ccache /usr/lib64/ccache/cc
16- ln -s /usr/bin/ccache /usr/lib64/ccache/gcc
17- ln -s /usr/bin/ccache /usr/lib64/ccache/g++
14+ for comp in c++ cc gcc g++; do
15+ if ! [ -e /usr/lib64/ccache/$comp ]; then
16+ ln -s /usr/bin/ccache /usr/lib64/ccache/$comp
17+ fi
18+ done
1819 export PATH=" /usr/lib64/ccache:$PATH "
1920 elif [[ -d " /usr/lib/ccache" ]]; then
20- ln -s /usr/bin/ccache /usr/lib/ccache/c++
21- ln -s /usr/bin/ccache /usr/lib/ccache/cc
22- ln -s /usr/bin/ccache /usr/lib/ccache/gcc
23- ln -s /usr/bin/ccache /usr/lib/ccache/g++
21+ for comp in c++ cc gcc g++; do
22+ if ! [ -e /usr/lib/ccache/$comp ]; then
23+ ln -s /usr/bin/ccache /usr/lib/ccache/$comp
24+ fi
25+ done
2426 export PATH=" /usr/lib/ccache:$PATH "
2527 fi
2628
You can’t perform that action at this time.
0 commit comments