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
c0cab698
Commit
c0cab698
authored
Sep 23, 2013
by
Michał Siwek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multiple fixes and improvements
parent
184af33a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
crew
crew
+12
-11
No files found.
crew
View file @
c0cab698
...
...
@@ -55,7 +55,7 @@ def download
sha1sum
=
@pkg
.
binary_sha1
[
@device
[
:architecture
]]
end
Dir
.
chdir
CREW_BREW_DIR
do
system
(
'wget'
,
'--content-disposition'
,
url
)
system
(
'wget'
,
'--content-disposition'
,
'-N'
,
url
)
abort
'Checksum mismatch :/ try again'
unless
Digest
::
SHA1
.
hexdigest
(
File
.
read
(
"./
#{
filename
}
"
)
)
==
sha1sum
end
puts
"Archive downloaded"
...
...
@@ -125,15 +125,16 @@ def install
meta
=
download
Dir
.
chdir
CREW_BREW_DIR
do
puts
"Unpacking archive, this may take a while..."
system
"tar"
,
"zxf"
,
meta
[
:filename
]
system
"tar"
,
"xf"
,
meta
[
:filename
]
if
meta
[
:source
]
==
true
puts
"Building from source, this may take a while..."
sytem
"cd *"
@pkg
.
build
system
"rm -rf"
,
CREW_DEST_DIR
+
"/*"
#wipe crew destdir
puts
"Installing..."
@pkg
.
install
topdir
=
`tar -tf
#{
meta
[
:filename
]
}
| sed -e 's@/.*@@' | uniq`
.
chomp!
Dir
.
chdir
CREW_BREW_DIR
+
topdir
do
puts
"Building from source, this may take a while..."
@pkg
.
build
system
"rm -rf"
,
CREW_DEST_DIR
+
"/*"
#wipe crew destdir
puts
"Installing..."
@pkg
.
install
end
Dir
.
chdir
CREW_DEST_DIR
do
#create directory list
...
...
@@ -157,12 +158,12 @@ def install
FileUtils
.
mv
'./filelist'
,
CREW_CONFIG_PATH
+
"meta/
#{
@pkg
.
name
}
.filelist"
Dir
.
chdir
CREW_CONFIG_PATH
do
File
.
open
(
"meta/
#{
@pkg
.
name
}
.directorylist"
).
each_line
do
|
line
|
system
"mkdir"
,
"-p"
,
line
.
chomp
system
"
sudo
mkdir"
,
"-p"
,
line
.
chomp
end
File
.
open
(
"meta/
#{
@pkg
.
name
}
.filelist"
).
each_line
do
|
line
|
Dir
.
chdir
CREW_BREW_DIR
do
system
"mv"
,
'.'
+
line
.
chomp
,
line
.
chomp
system
"
sudo
mv"
,
'.'
+
line
.
chomp
,
line
.
chomp
end
end
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