mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Change crew and lib/package.rb to add postinstall process.
This commit is contained in:
10
crew
10
crew
@@ -424,6 +424,13 @@ def build_and_preconfigure (target_dir)
|
||||
end
|
||||
end
|
||||
|
||||
def post_install (target_dir)
|
||||
Dir.chdir target_dir do
|
||||
puts "Performing post-install..."
|
||||
@pkg.postinstall
|
||||
end
|
||||
end
|
||||
|
||||
def compress_doc (dir)
|
||||
# check whether crew should compress
|
||||
return if CREW_NOT_COMPRESS || !File.exist?("#{CREW_PREFIX}/bin/compressdoc")
|
||||
@@ -610,6 +617,9 @@ def install
|
||||
install_package dest_dir
|
||||
end
|
||||
|
||||
# perform post-install process
|
||||
post_install target_dir
|
||||
|
||||
#add to installed packages
|
||||
@device[:installed_packages].push(name: @pkg.name, version: @pkg.version)
|
||||
File.open(CREW_CONFIG_PATH + 'device.json', 'w') do |file|
|
||||
|
||||
@@ -69,10 +69,23 @@ class Package
|
||||
@is_fake
|
||||
end
|
||||
|
||||
# Function to perform build from source.
|
||||
def self.build
|
||||
|
||||
end
|
||||
|
||||
# Function to perform install from source build.
|
||||
def self.install
|
||||
|
||||
end
|
||||
|
||||
# Function to perform post-install for all even if it is a fake package.
|
||||
def self.postinstall
|
||||
|
||||
end
|
||||
|
||||
# Function to perform check from source build.
|
||||
# This is execute if and only if `crew build`.
|
||||
def self.check
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user