Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
8d93253b
Commit
8d93253b
authored
7 years ago
by
lyxell
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1110 from jam7/crew-postinstall
Modify crew to add postinstall function
parents
ccc3ec18
d5252be8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
crew
crew
+10
-0
lib/package.rb
lib/package.rb
+13
-0
No files found.
crew
View file @
8d93253b
...
@@ -424,6 +424,13 @@ def build_and_preconfigure (target_dir)
...
@@ -424,6 +424,13 @@ def build_and_preconfigure (target_dir)
end
end
end
end
def
post_install
(
target_dir
)
Dir
.
chdir
target_dir
do
puts
"Performing post-install..."
@
pkg
.
postinstall
end
end
def
compress_doc
(
dir
)
def
compress_doc
(
dir
)
#
check
whether
crew
should
compress
#
check
whether
crew
should
compress
return
if
CREW_NOT_COMPRESS
||
!File.exist?("#{CREW_PREFIX}/bin/compressdoc")
return
if
CREW_NOT_COMPRESS
||
!File.exist?("#{CREW_PREFIX}/bin/compressdoc")
...
@@ -610,6 +617,9 @@ def install
...
@@ -610,6 +617,9 @@ def install
install_package dest_dir
install_package dest_dir
end
end
# perform post-install process
post_install target_dir
#add to installed packages
#add to installed packages
@device[:installed_packages].push(name: @pkg.name, version: @pkg.version)
@device[:installed_packages].push(name: @pkg.name, version: @pkg.version)
File.open(CREW_CONFIG_PATH + '
device
.
json
', '
w
') do |file|
File.open(CREW_CONFIG_PATH + '
device
.
json
', '
w
') do |file|
...
...
This diff is collapsed.
Click to expand it.
lib/package.rb
View file @
8d93253b
...
@@ -69,10 +69,23 @@ class Package
...
@@ -69,10 +69,23 @@ class Package
@is_fake
@is_fake
end
end
# Function to perform build from source.
def
self
.
build
def
self
.
build
end
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
def
self
.
check
end
end
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment