merged scripts into single command
This commit is contained in:
parent
3689b6c5b5
commit
3a91986d11
2
PKGBUILD
2
PKGBUILD
|
@ -16,7 +16,7 @@ md5sums=('SKIP')
|
|||
package() {
|
||||
cd "$srcdir"
|
||||
install -dm755 $pkgdir/usr/bin
|
||||
cp -r $srcdir/$pkgname/bin $pkgdir/usr
|
||||
cp -r $srcdir/$pkgname/fpf $pkgdir/usr/bin/
|
||||
chmod a+x $pkgdir/usr/bin/*
|
||||
install -dm755 "$pkgdir"/usr/lib/systemd/system/
|
||||
install -m644 $srcdir/$pkgname/fpf.{service,timer} "$pkgdir"/usr/lib/systemd/system/
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
pacman -Sl | awk '{print $2($4=="" ? "" : " *")}'| fzf -e -m --preview 'cat <(pacman -Si {1}) <(pacman -Fl {1} | awk "{print \$2}")' --layout=reverse | xargs -ro -n1 sudo pacman -S
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
yay -Sl | awk '{print $2($4=="" ? "" : " *")}'| fzf -e -m --preview 'cat <(yay -Si {1}) <(yay -Fl {1} | awk "{print \$2}")' --layout=reverse | xargs -ro -n1 yay -S
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
|
||||
### Help
|
||||
|
||||
Help() {
|
||||
echo
|
||||
echo "Use fzf to search and install with Pacman and Yay"
|
||||
echo "Defaults to Pacman if no options passed"
|
||||
echo
|
||||
echo "Syntax: fpf -[y|h]"
|
||||
echo
|
||||
echo "options:"
|
||||
echo
|
||||
echo "y Search and install with Yay"
|
||||
echo
|
||||
echo "h Print this help screen."
|
||||
echo
|
||||
echo
|
||||
}
|
||||
|
||||
### MAIN
|
||||
|
||||
while getopts ":yh" option; do
|
||||
case $option in
|
||||
|
||||
y) yay -Sl | awk '{print $2($4=="" ? "" : " *")}'| fzf -e -m --preview 'cat <(yay -Si {1}) <(yay -Fl {1} | awk "{print \$2}")' --layout=reverse | xargs -ro -n1 yay -S
|
||||
exit;;
|
||||
|
||||
h) Help
|
||||
exit;;
|
||||
|
||||
\?) echo "Error: Invalid option"
|
||||
exit;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
pacman -Sl | awk '{print $2($4=="" ? "" : " *")}'| fzf -e -m --preview 'cat <(pacman -Si {1}) <(pacman -Fl {1} | awk "{print \$2}")' --layout=reverse | xargs -ro -n1 sudo pacman -S
|
Loading…
Reference in New Issue