Files
chromebrew/packages/cros_resize.rb
Maximilian Downey Twiss f6dc1d8d4e Derive binary_url in package.rb (#7082)
* Add binary_compression value to each package

* Remove binary_url values and arrays

* Handle packages with empty binary_sha256 arrays (either missing binaries or not compiled by us)
2024-01-25 11:03:31 -05:00

20 lines
894 B
Ruby

require 'package'
class Cros_resize < Package
description 'A partition resizing tool for Chrome OS devices.'
homepage 'https://github.com/ethanmad/chromeos-resize'
version '6b01b7'
license 'GPL-3'
compatibility 'all'
source_url 'https://raw.githubusercontent.com/ethanmad/chromeos-resize/6b01b71f649dbf77b2e6ac932e8ad868e8272250/cros-resize.sh'
source_sha256 '747ef80f29a94500304f23595c5edfa46edd4b4fa5a40d399b474984004e9ffe'
no_compile_needed
def self.install
system 'curl -#LO https://raw.githubusercontent.com/ethanmad/chromeos-resize/6b01b71f649dbf77b2e6ac932e8ad868e8272250/cros-resize.sh'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest(File.read('cros-resize.sh')) == '747ef80f29a94500304f23595c5edfa46edd4b4fa5a40d399b474984004e9ffe'
system "install -Dm755 cros-resize.sh #{CREW_DEST_PREFIX}/bin/cros-resize"
end
end