summarylogtreecommitdiffstats
path: root/pacfoster.rb
diff options
context:
space:
mode:
authorFlorian Dejonckheere2021-03-20 14:31:03 +0100
committerFlorian Dejonckheere2021-03-20 14:31:03 +0100
commit5b25d5454731d7568030a65947065938c739ca38 (patch)
tree92eaf2c72aa533d017be4cc9d65139ea30ffaab4 /pacfoster.rb
parentb3568b2b9257279c4a41aa71269136c4fdd7f8a7 (diff)
downloadaur-5b25d5454731d7568030a65947065938c739ca38.tar.gz
Make pikaur optional
Diffstat (limited to 'pacfoster.rb')
-rwxr-xr-xpacfoster.rb8
1 files changed, 5 insertions, 3 deletions
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