Skip to content

Instantly share code, notes, and snippets.

@cstrouse
Last active November 4, 2019 00:02
Show Gist options
  • Save cstrouse/14d0773dbb2a9745cefb5c5bfeb533f2 to your computer and use it in GitHub Desktop.
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
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