Commit dc89afd4 authored by Ed Reel's avatar Ed Reel

Add self.remove package section

parent d9621940
......@@ -499,7 +499,7 @@ def download
Dir.chdir CREW_BREW_DIR do
unless ENV["CREW_CACHE_OPT"].to_s == ''
unless File.directory?(CREW_CACHE_DIR)
FileUtils.mkdir_p(CREW_CACHE_DIR)
FileUtils.mkdir_p(CREW_CACHE_DIR)
end
if File.file?("#{CREW_CACHE_DIR}#{filename}")
if Digest::SHA256.hexdigest( File.read("#{CREW_CACHE_DIR}#{filename}") ) == sha256sum then
......@@ -973,8 +973,10 @@ def remove (pkgName)
file.write JSON.pretty_generate(out)
end
puts "#{pkgName.capitalize} removed!".lightgreen
set_package pkgName, true
@pkg.remove
puts "#{pkgName.capitalize} removed!".lightgreen
end
def build_command (args)
......
# Defines common constants used in different parts of crew
CREW_VERSION = '1.5.2'
CREW_VERSION = '1.5.3'
ARCH_ACTUAL = `uname -m`.strip
# This helps with virtualized builds on aarch64 machines
......
......@@ -105,6 +105,11 @@ class Package
end
# Function to perform after package removal.
def self.remove
end
def self.system(*args)
# add "-j#" argument to "make" at compile-time, if necessary
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment