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 /pacfoster.rb | |
parent | b3568b2b9257279c4a41aa71269136c4fdd7f8a7 (diff) | |
download | aur-5b25d5454731d7568030a65947065938c739ca38.tar.gz |
Make pikaur optional
Diffstat (limited to 'pacfoster.rb')
-rwxr-xr-x | pacfoster.rb | 8 |
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 |