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
4ffdf54e
Commit
4ffdf54e
authored
Jan 23, 2019
by
Ed Reel
Committed by
Chris Thurber
Jan 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add postinstall command to crew (#3108)
parent
68993069
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
README.md
README.md
+1
-0
crew
crew
+17
-1
lib/const.rb
lib/const.rb
+1
-1
No files found.
README.md
View file @
4ffdf54e
...
...
@@ -84,6 +84,7 @@ Where available commands are:
*
help -
`get information about command usage`
*
install -
`install package(s) along with dependencies after prompting for confirmation`
*
list -
`available or installed packages`
*
postinstall -
`display postinstall messages of package(s)`
*
remove -
`remove package(s)`
*
search -
`look for package(s)`
*
update -
`update crew itself`
...
...
crew
View file @
4ffdf54e
...
...
@@ -27,6 +27,7 @@ Usage:
crew
help
[<
command
>]
crew
install
[-
k
|--
keep
]
[-
s
|--
build
-
from
-
source
]
[-
S
|--
recursive
-
build
]
[-
v
|--
verbose
]
<
name
>
...
crew
list
(
available
|
installed
)
crew
postinstall
<
name
>
...
crew
remove
[-
v
|--
verbose
]
<
name
>
...
crew
search
[-
v
|--
verbose
]
[<
name
>
...]
crew
update
...
...
@@ -201,6 +202,10 @@ def help (pkgName)
when
"list"
puts
"List available or installed packages"
puts
"Usage: crew list (available|installed)"
when
"postinstall"
puts
"Display postinstall messages of package(s)."
puts
"Usage: crew postinstall <package1> [<package2> ...]"
puts
"The package(s) must be currently installed."
when
"remove"
puts
"Remove package(s)."
puts
"Usage: crew remove [-v|--verbose] <package1> [<package2> ...]"
...
...
@@ -477,7 +482,7 @@ end
def
build_and_preconfigure
(
target_dir
)
Dir
.
chdir
target_dir
do
puts
"Building from source, this may take a while..."
puts
"Building from source, this may take a while..."
#
Rename
*.
la
files
temporily
to
*.
la_tmp
to
avoid
#
libtool
:
link
:
'*.la'
is
not
a
valid
libtool
archive
.
...
...
@@ -927,6 +932,17 @@ def list_command (args)
end
end
def
postinstall_command
(
args
)
args
[
"<name>"
].
each
do
|
name
|
set_package
name
,
true
if
@
device
[:
installed_packages
].
any
?
do
|
elem
|
elem
[:
name
]
==
name
end
@
pkg
.
postinstall
else
puts
"Package #{name} is not installed. :("
.
lightred
end
end
end
def
remove_command
(
args
)
args
[
"<name>"
].
each
do
|
name
|
remove
name
...
...
lib/const.rb
View file @
4ffdf54e
# Defines common constants used in different parts of crew
CREW_VERSION
=
'1.1.
1
'
CREW_VERSION
=
'1.1.
2
'
ARCH
=
`uname -m`
.
strip
ARCH_LIB
=
if
ARCH
==
'x86_64'
then
'lib64'
else
'lib'
end
...
...
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