diff options
author | Florian Dejonckheere | 2021-03-20 14:31:03 +0100 |
---|---|---|
committer | Florian Dejonckheere | 2021-03-20 14:31:03 +0100 |
commit | 5b25d5454731d7568030a65947065938c739ca38 (patch) | |
tree | 92eaf2c72aa533d017be4cc9d65139ea30ffaab4 | |
parent | b3568b2b9257279c4a41aa71269136c4fdd7f8a7 (diff) | |
download | aur-pacfoster.tar.gz |
Make pikaur optional
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 7 | ||||
-rwxr-xr-x | pacfoster.rb | 8 |
3 files changed, 12 insertions, 9 deletions
@@ -1,16 +1,16 @@ pkgbase = pacfoster pkgdesc = A cleaning script similar to 'debfoster', using the pacman build system. pkgver = 0.1 - pkgrel = 1 + pkgrel = 2 url = https://bbs.archlinux.org/viewtopic.php?pid=834436 arch = i686 arch = x86_64 license = GPL depends = ruby>=1.9.2 depends = pacman>=3.4.1 - depends = pikaur + optdepends = pikaur source = pacfoster.rb - md5sums = 1d8ce2067d5831b408e9012607bb227e + md5sums = 44c0f1a8ebbbe6e606c0793aa3b46fa8 pkgname = pacfoster @@ -3,14 +3,15 @@ pkgname=pacfoster pkgver=0.1 -pkgrel=1 +pkgrel=2 pkgdesc="A cleaning script similar to 'debfoster', using the pacman build system." arch=('i686' 'x86_64') url="https://bbs.archlinux.org/viewtopic.php?pid=834436" license=('GPL') -depends=('ruby>=1.9.2' 'pacman>=3.4.1' 'pikaur') +depends=('ruby>=1.9.2' 'pacman>=3.4.1') +optdepends=('pikaur') source=('pacfoster.rb') -md5sums=('1d8ce2067d5831b408e9012607bb227e') +md5sums=('44c0f1a8ebbbe6e606c0793aa3b46fa8') package() { diff --git a/pacfoster.rb b/pacfoster.rb index d41dfe92cb81..7d2fd82bb0d7 100755 --- a/pacfoster.rb +++ b/pacfoster.rb @@ -4,6 +4,8 @@ file = File.expand_path("~/.pacsafe.conf") trap("INT") { exit } $stdout.sync = true #rsync "realtime" output +helper = ENV.fetch("AURHELPER", "pikaur") + if File.file? file filelist = File.new(file, "r").lines.collect {|line| line.strip} filelist.delete("") @@ -23,7 +25,7 @@ i=0 while i < testlist.size item = testlist[i] - system("pikaur -Qs \"^#{item.gsub("+", '\\\\\\\\\\\+')}$\" 2>/dev/null") + system("#{helper} -Qs \"^#{item.gsub("+", '\\\\\\\\\\\+')}$\" 2>/dev/null") print "(Yes/Prune/Skip/Info/Undo/eXit/Quit/Help) " begin @@ -42,7 +44,7 @@ while i < testlist.size prunelist.push item when "i" puts ": info" - print `pikaur -Qi #{item}` + print `helper -Qi #{item}` i -= 1 when "q", "\x03" puts ": quitting" @@ -84,5 +86,5 @@ end if prunelist.size > 0 then puts "removing package(s) #{prunelist.join(" ")}" - system "pikaur -Rsc #{prunelist.join(" ")}" + system "helper -Rsc #{prunelist.join(" ")}" end |