diff options
author | pingplug | 2023-09-21 16:11:46 +0800 |
---|---|---|
committer | pingplug | 2023-09-21 16:11:46 +0800 |
commit | b9c19bcce3686442bd85d4ee9122ea970a252fb3 (patch) | |
tree | ba17d28c2980651c72ea890c4bdd680bdf8506bf | |
parent | f1ad010741b27532fb302a1c43fe2ea6acdd960b (diff) | |
download | aur-ccache-ext.tar.gz |
update
check package name before link
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | update-ccache-links.sh | 10 |
3 files changed, 11 insertions, 8 deletions
@@ -1,6 +1,6 @@ pkgbase = ccache-ext pkgdesc = pacman hook for adding more compiler links to ccache - pkgver = 2 + pkgver = 3 pkgrel = 1 install = ccache-ext.install arch = any @@ -8,8 +8,7 @@ pkgbase = ccache-ext depends = ccache source = update-ccache-links.sh source = update-ccache-links.hook - sha256sums = d030775bced390d7f0f090f5b9c364229ebbd2e39b51da297784dd19502c866f + sha256sums = 152d8d3cbe25c9c8380f98846f3f80e9b36fe375d4c2c182a9ab3e02ad757146 sha256sums = e7c0cb74b47371162262e1ad57590cbd41a3fdeaa4988370fde98ae19c75703c pkgname = ccache-ext - @@ -1,7 +1,7 @@ # Maintainer: pingplug < aur at pingplug dot me > pkgname=ccache-ext -pkgver=2 +pkgver=3 pkgrel=1 pkgdesc='pacman hook for adding more compiler links to ccache' arch=('any') @@ -9,7 +9,7 @@ license=('custom') depends=('ccache') source=('update-ccache-links.sh' 'update-ccache-links.hook') -sha256sums=('d030775bced390d7f0f090f5b9c364229ebbd2e39b51da297784dd19502c866f' +sha256sums=('152d8d3cbe25c9c8380f98846f3f80e9b36fe375d4c2c182a9ab3e02ad757146' 'e7c0cb74b47371162262e1ad57590cbd41a3fdeaa4988370fde98ae19c75703c') install=$pkgname.install diff --git a/update-ccache-links.sh b/update-ccache-links.sh index 19ce277ef5d7..2db8669690d4 100644 --- a/update-ccache-links.sh +++ b/update-ccache-links.sh @@ -2,7 +2,7 @@ # Clear symlinks 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]* +for file in {*-,}{c++,cc,clang,clang++,g++,gcc}{,-[0-9]*} do if [[ -L $file ]] then @@ -12,11 +12,15 @@ done # Recreate synlinks 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]* +for file in {*-,}{c++,cc,clang,clang++,g++,gcc}{,-[0-9]*} do if [[ -x $file ]] then - ln -s /usr/bin/ccache "/usr/lib/ccache/bin/$file" + ret=`pacman -Qqo "/usr/bin/$file" | grep -e gcc -e clang` + if [[ $ret ]] + then + ln -s /usr/bin/ccache "/usr/lib/ccache/bin/$file" + fi fi done |