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
88dfe42a
Commit
88dfe42a
authored
Jun 06, 2018
by
Chris Thurber
Committed by
GitHub
Jun 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2409 from uberhacker/add-const-command
Add const command
parents
a0cc6548
37621db6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
11 deletions
+57
-11
README.md
README.md
+12
-11
crew
crew
+45
-0
No files found.
README.md
View file @
88dfe42a
...
...
@@ -57,17 +57,18 @@ Usage
Where available commands are:
*
build [build package(s) from source and store the archive and checksum in the current working directory]
*
download [download package(s) to
`CREW_BREW_DIR`
(
`/usr/local/tmp/crew`
by default), but don't install]
*
files [display installed files of package(s).]
*
help [get information about command usage]
*
install [install package(s) along with dependencies after prompting for confirmation]
*
list [available or installed packages]
*
remove [remove package(s)]
*
search [look for a package]
*
update [update crew itself]
*
upgrade [update all or specific package(s)]
*
whatprovides [regex search for package(s) that contains file(s)]
*
build -
`build package(s) from source and store the archive and checksum in the current working directory`
*
const -
`display constant(s)`
*
download -
`download package(s) to CREW_BREW_DIR (/usr/local/tmp/crew by default), but don't install`
*
files -
`display installed files of package(s)`
*
help -
`get information about command usage`
*
install -
`install package(s) along with dependencies after prompting for confirmation`
*
list -
`available or installed packages`
*
remove -
`remove package(s)`
*
search -
`look for package(s)`
*
update -
`update crew itself`
*
upgrade -
`update all or specific package(s)`
*
whatprovides -
`regex search for package(s) that contains file(s)`
Available packages are listed in the
[
packages directory
](
https://github.com/skycocker/chromebrew/tree/master/packages
)
.
...
...
crew
View file @
88dfe42a
...
...
@@ -22,6 +22,7 @@ Chromebrew - Package manager for Chrome OS http://skycocker.github.io/chromebrew
Usage
:
crew
build
[-
k
|--
keep
]
[-
v
|--
verbose
]
<
name
>
...
crew
download
[-
v
|--
verbose
]
<
name
>
...
crew
const
[<
name
>
...]
crew
files
<
name
>
...
crew
help
[<
command
>]
crew
install
[-
k
|--
keep
]
[-
s
|--
build
-
from
-
source
]
[-
v
|--
verbose
]
<
name
>
...
...
...
@@ -173,6 +174,10 @@ def help (pkgName)
puts
"Build package(s) from source and place the archive and checksum in the current working directory."
puts
"If `-k` or `--keep` is present, the `CREW_BREW_DIR` (#{CREW_BREW_DIR}) directory will remain."
puts
"If `-v` or `--verbose` is present, extra information will be displayed."
when
"const"
puts
"Display constant(s)."
puts
"Usage: crew const [<const1> <const2> ...]"
puts
"If no constants are provided, all constants will be displayed."
when
"download"
puts
"Download package(s)."
puts
"Usage: crew download [-v|--verbose] <package1> [<package2> ...]"
...
...
@@ -229,6 +234,36 @@ def help (pkgName)
end
end
def
const
(
var
)
if
var
value
=
eval
(
var
)
puts
"#{var}=#{value}"
else
vars
=
[
'ARCH'
,
'ARCH_LIB'
,
'CHROMEOS_RELEASE'
,
'CREW_BREW_DIR'
,
'CREW_CONFIG_PATH'
,
'CREW_DEST_DIR'
,
'CREW_DEST_LIB_PREFIX'
,
'CREW_DEST_PREFIX'
,
'CREW_LIB_PATH'
,
'CREW_LIB_PREFIX'
,
'CREW_NOT_COMPRESS'
,
'CREW_NOT_STRIP'
,
'CREW_NPROC'
,
'CREW_PREFIX'
,
'CREW_VERSION'
,
'USER'
]
vars
.
each
{
|
var
|
value
=
eval
(
var
)
puts
"#{var}=#{value}"
}
end
end
def
files
(
pkgName
)
filelist
=
"#{CREW_PREFIX}/etc/crew/meta/#{pkgName}.filelist"
if
File
.
exists
?
"#{filelist}"
...
...
@@ -832,6 +867,16 @@ def download_command (args)
end
end
def
const_command
(
args
)
unless
args
[
"<name>"
].
empty
?
args
[
"<name>"
].
each
do
|
name
|
const
name
end
else
const
nil
end
end
def
files_command
(
args
)
args
[
"<name>"
].
each
do
|
name
|
@
pkgName
=
name
...
...
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