From 2d0046b77fb3b818064520459492c9c8633b4530 Mon Sep 17 00:00:00 2001 From: Eric Lay Date: Mon, 15 Jun 2020 14:55:13 -0500 Subject: [PATCH] v0.4 --- PKGBUILD | 11 ----------- fpf | 14 ++++++++++---- fpf.service | 7 ------- fpf.timer | 8 -------- 4 files changed, 10 insertions(+), 30 deletions(-) delete mode 100644 fpf.service delete mode 100644 fpf.timer diff --git a/PKGBUILD b/PKGBUILD index 8a1cd68..d239009 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -18,15 +18,4 @@ package() { install -dm755 $pkgdir/usr/bin 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/ - - echo - echo - echo ------------------------------------- - echo 'Please start/enable fpf service' - echo 'See git installation instructions' - echo ------------------------------------- - echo - echo } diff --git a/fpf b/fpf index 8021f89..edbe36d 100755 --- a/fpf +++ b/fpf @@ -1,8 +1,9 @@ #!/usr/bin/bash +### Set up package lists +pacman -Slq > /tmp/packages & ### Help - Help() { echo echo "Use fzf to search and install with Pacman and Yay" @@ -20,11 +21,14 @@ Help() { } ### 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 + y) + wget -P /tmp/aur/ https://aur.archlinux.org/packages.gz >/dev/null 2>&1 && gunzip -f /tmp/aur/packages.gz && cat /tmp/aur/packages >> /tmp/packages + yay -Qq > /tmp/local_packages + cat /tmp/packages /tmp/local_packages | sort | uniq > /tmp/all_packages + cat /tmp/packages | 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 @@ -36,4 +40,6 @@ while getopts ":yh" option; do 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 +pacman -Qq > /tmp/local_packages +cat /tmp/packages /tmp/local_packages | sort | uniq > /tmp/all_packages +cat /tmp/all_packages | 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 diff --git a/fpf.service b/fpf.service deleted file mode 100644 index 6ccb9d5..0000000 --- a/fpf.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Sync files database - -[Service] -Type=oneshot -User=root -ExecStart=/usr/bin/sh -c 'pacman -Fy' diff --git a/fpf.timer b/fpf.timer deleted file mode 100644 index d70ff84..0000000 --- a/fpf.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Periodically sync files database - -[Timer] -OnUnitInactiveSec=24hours - -[Install] -WantedBy=multi-user.target