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
d32b537a
Commit
d32b537a
authored
Dec 20, 2016
by
Damian Montero
Committed by
GitHub
Dec 20, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #276 from minektur/master
add zip source file support, fix a minor nit
parents
249f799c
9929a7df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
crew
crew
+22
-4
No files found.
crew
View file @
d32b537a
...
...
@@ -15,8 +15,8 @@ CREW_CONFIG_PATH = CREW_PREFIX + '/etc/crew/'
CREW_BREW_DIR
=
CREW_PREFIX
+
'/tmp/crew/'
CREW_DEST_DIR
=
CREW_BREW_DIR
+
'/dest'
ARCH
=
`uname -m
| tr -d '
\n\r
'`
SHORTARCH
=
`getconf LONG_BIT
| tr -d '
\n\r
'`
ARCH
=
`uname -m
`
.
strip
SHORTARCH
=
`getconf LONG_BIT
`
.
strip
$LOAD_PATH
.
unshift
"
#{
CREW_LIB_PATH
}
lib"
...
...
@@ -229,12 +229,30 @@ def install
unless
@pkg
.
is_fake?
meta
=
download
topdir
=
""
Dir
.
chdir
CREW_BREW_DIR
do
puts
"Unpacking archive, this may take a while..."
system
"tar"
,
"xf"
,
meta
[
:filename
]
if
meta
[
:filename
][
-
4
,
4
]
==
".zip"
system
"unzip"
,
"-qq"
,
"-d"
,
"tmpzip"
,
meta
[
:filename
]
else
system
"tar"
,
"xf"
,
meta
[
:filename
]
end
if
meta
[
:source
]
==
true
abort
"You don't have a working C compiler. Run 'crew install buildessential' to get one and try again."
unless
system
(
"gcc"
,
"--version"
)
topdir
=
`tar -tf
#{
meta
[
:filename
]
}
| sed -e 's@/.*@@' | uniq`
.
chomp!
if
meta
[
:filename
][
-
4
,
4
]
==
".zip"
Dir
.
chdir
"tmpzip"
do
entries
=
Dir
[
"*"
]
if
entries
.
length
==
0
abort
"empty zip archive:
#{
meta
[
:filename
]
}
"
elsif
entries
.
length
==
1
topdir
=
"tmpzip/"
+
entries
.
first
else
topdir
=
"tmpzip/"
end
end
else
topdir
=
`tar -tf
#{
meta
[
:filename
]
}
| sed -e 's@/.*@@' | uniq`
.
chomp!
end
Dir
.
chdir
CREW_BREW_DIR
+
topdir
do
puts
"Building from source, this may take a while..."
@pkg
.
build
...
...
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