changed post install to hook

This commit is contained in:
Eric Lay 2020-06-11 20:40:05 -05:00
parent 3fc4fb0ad9
commit 62fbe197fe
3 changed files with 12 additions and 5 deletions

View File

@ -10,7 +10,6 @@ depends=('pacman'
'yay'
'fzf')
makedepends=('git')
install=$pkgname.install
source=("git://github.com/ericlay/$pkgname")
md5sums=('SKIP')
@ -19,4 +18,6 @@ package() {
install -dm755 $pkgdir/usr/bin
cp -r $srcdir/$pkgname/bin $pkgdir/usr
chmod a+x $pkgdir/usr/bin/*
install -dm755 "$pkgdir"/usr/share/libalpm/hooks/
install -m644 fuzzy-pkg-finder.hook "$pkgdir"/usr/share/libalpm/hooks/
}

10
fuzzy-pkg-finder.hook Normal file
View File

@ -0,0 +1,10 @@
[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Target = fuzzy-pkg-finder
[Action]
Description = Syncing file database...
When = PostTransaction
Exec = /bin/sh -c 'pacman -Fy && yay -Fy'

View File

@ -1,4 +0,0 @@
## arg 1: the new package version
post_install() {
sudo pacman -Fy && yay -Fy
}