Skip to content

Commit b329ba7

Browse files
author
Matthias Koefferlein
committed
Preparing for PR #2083
With the new manylinux image, ccache is on a newer version that already creates some ccache links itself
1 parent 9d4a578 commit b329ba7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

ci-scripts/docker/docker_prepare.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)