Last active
November 4, 2019 00:02
-
-
Save cstrouse/14d0773dbb2a9745cefb5c5bfeb533f2 to your computer and use it in GitHub Desktop.
Generates a template for you to work with using the ck4up utility from CRUX
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
require 'tmpdir' | |
# | |
# Generates a template for you to work with using the ck4up utility from CRUX | |
# https://crux.nu/Wiki/WorkingWithCk4up | |
# | |
workspace = Dir.mktmpdir | |
Dir.chdir(workspace) | |
system('git clone https://github.com/skycocker/chromebrew.git') | |
Dir.chdir('chromebrew') | |
Dir.glob('packages/*.rb').sort.each do |f| | |
package_filename = f | |
f = File.read(f) | |
next if !!(f =~ /is_fake/) || !!(f !~ /source_url/) | |
next if package_filename == 'packages/wkhtmltox.rb' | |
source_url = f.match(/source_url [\'\"](.+)[\'\"]/)[1] | |
package_name = File.basename(package_filename, '.rb') | |
puts "#{package_name} md5 #{source_url} @TAR@" | |
end | |
FileUtils.remove_entry workspace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment