diff options
author | bartus | 2019-06-29 17:12:28 +0200 |
---|---|---|
committer | bartus | 2019-06-29 17:12:28 +0200 |
commit | cdd8c2315639e28bcf93318440ffe33c74977b6e (patch) | |
tree | 01bfbe366f9ca5a28c0e4c23ae9327d5c091bb09 | |
parent | 577bbbfdf8eff15ae48ee4345e987af8a9fe58ac (diff) | |
download | aur-cdd8c2315639e28bcf93318440ffe33c74977b6e.tar.gz |
add post_remove script
delate extra symlinks using libalpm own query
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 1 | ||||
-rw-r--r-- | ccache-ext.install | 12 |
3 files changed, 14 insertions, 0 deletions
@@ -2,6 +2,7 @@ pkgbase = ccache-ext pkgdesc = pacman hook for adding more compiler links to ccache pkgver = 1 pkgrel = 1 + install = ccache-ext.install arch = any license = custom depends = ccache @@ -11,6 +11,7 @@ source=('update-ccache-links.sh' 'update-ccache-links.hook') sha256sums=('d030775bced390d7f0f090f5b9c364229ebbd2e39b51da297784dd19502c866f' 'e7c0cb74b47371162262e1ad57590cbd41a3fdeaa4988370fde98ae19c75703c') +install=$pkgname.install package() { install -d "${pkgdir}/usr/lib/ccache/bin" diff --git a/ccache-ext.install b/ccache-ext.install new file mode 100644 index 000000000000..88b0789b6c03 --- /dev/null +++ b/ccache-ext.install @@ -0,0 +1,12 @@ +# arg 1: the old package version +post_remove() { + # Clear symlinks + echo "Clear extra ccache symlinks..." + for file in /usr/lib/ccache/bin/*; do + if ! pacman -Qo $file >/dev/null 2>&1 + then + echo "remove: $file" + rm $file + fi + done +} |