summarylogtreecommitdiffstats
path: root/update-ccache-links.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update-ccache-links.sh')
-rw-r--r--update-ccache-links.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/update-ccache-links.sh b/update-ccache-links.sh
new file mode 100644
index 000000000000..810375334042
--- /dev/null
+++ b/update-ccache-links.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+cd /usr/lib/ccache/bin
+for file in {c++,cc,clang,clang++,g++,gcc} {c++,cc,clang,clang++,g++,gcc}-[0-9]* *-{c++,cc,clang,clang++,g++,gcc} *-{c++,cc,clang,clang++,g++,gcc}-[0-9]*
+do
+ if [[ -L $file ]]
+ then
+ rm "/usr/lib/ccache/bin/$file"
+ fi
+done
+
+cd /usr/bin
+for file in {c++,cc,clang,clang++,g++,gcc} {c++,cc,clang,clang++,g++,gcc}-[0-9]* *-{c++,cc,clang,clang++,g++,gcc} *-{c++,cc,clang,clang++,g++,gcc}-[0-9]*
+do
+ if [[ -x $file ]]
+ then
+ ln -s /usr/bin/ccache "/usr/lib/ccache/bin/$file"
+ fi
+done