Created
February 26, 2023 18:52
-
-
Save supechicken/a52e1fa4686274ce12f95fdeeed953af to your computer and use it in GitHub Desktop.
Check chromebrew package update from archlinux repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $LOAD_PATH << "#{Dir.pwd}/lib" | |
| require 'package' | |
| `grep -A1 '# Adapted from Arch Linux .* PKGBUILD at:' packages/*.rb`.split('--').map do |message| | |
| message.strip.lines(chomp: true)[1].sub(/ # .*/, '').split('-# ', 2) | |
| end.each do |pkgFile, archLink| | |
| latest_ver = `curl -Ls '#{archLink.sub('blob', 'raw')}'`[/^pkgver=(.*)$/, 1] | |
| current_ver = Package.load_package(pkgFile).version | |
| puts "#{pkgFile}: current: #{current_ver}, latest: #{latest_ver}" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment