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
3f7b0c74
Commit
3f7b0c74
authored
Sep 26, 2013
by
Michał Siwek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
List packages when search invoked without arguments
parent
d22f1ed6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
crew
crew
+11
-1
No files found.
crew
View file @
3f7b0c74
...
...
@@ -32,6 +32,12 @@ def setPkg (pkgName, silent = false)
puts
"Found
#{
pkgName
}
, version
#{
@pkg
.
version
}
"
unless
silent
end
def
list_packages
Find
.
find
(
CREW_LIB_PATH
+
'packages'
)
do
|
filename
|
puts
File
.
basename
filename
,
'.rb'
end
end
def
search
(
pkgName
,
silent
=
false
)
Find
.
find
(
CREW_LIB_PATH
+
'packages'
)
do
|
filename
|
return
setPkg
(
pkgName
,
silent
)
if
filename
==
CREW_LIB_PATH
+
'packages/'
+
pkgName
+
'.rb'
...
...
@@ -241,7 +247,11 @@ end
case
@command
when
"search"
if
@pkgName
search
@pkgName
else
list_packages
end
when
"download"
search
@pkgName
download
...
...
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