bin/arson in evaryont-arson-2.0.0 vs bin/arson in evaryont-arson-2.0.1

- old
+ new

@@ -17,13 +17,14 @@ puts "" puts "Passing '?' to arson will cause it to check for any upgrades" exit 1 end -if pkg = ARGV.to_s.scan(/^aur(?:-.*)\/(.*)$/).flatten[0] +# Old regexp /^aur(?:-.*)\/(.*)$/ +if pkg = ARGV.to_s.scan(/aur(-.*?)?\/(.*)/i).flatten[1] if pkg = Arson.find_exact(pkg) - puts "Downloading #{pkg}..." + puts "Downloading #{pkg['Name']}..." Arson.download(pkg) exit 0 else warn "I think you attempted to download a package, but I couldn't find it" end @@ -66,9 +67,9 @@ if File.exists? "/usr/bin/pacman-color" exec "/usr/bin/pacman-color -Ss #{ARGV.join(' ')}" else exec "/usr/bin/pacman -Ss #{ARGV.join(' ')}" end -else +elsif packages.length == 1 puts "Downloading #{packages.first['Name']}..." Arson.download(packages.first) end