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
Łukasz Nowak
chromebrew
Commits
ac3dffb6
Commit
ac3dffb6
authored
Jun 22, 2017
by
Ed Reel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SHA1 checksum check on the binary download
parent
730cbe03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
packages/gdrive.rb
packages/gdrive.rb
+8
-1
No files found.
packages/gdrive.rb
View file @
ac3dffb6
...
...
@@ -13,16 +13,23 @@ class Gdrive < Package
case
ARCH
when
'x86_64'
system
"wget -L -O
#{
CREW_DEST_DIR
}
/usr/local/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA&export=download"
system
"sleep 10"
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA1
.
hexdigest
(
File
.
read
(
"
#{
CREW_DEST_DIR
}
/usr/local/bin/gdrive"
)
)
==
'4fd8391b300cac45963e53da44dcfe68da08d843'
when
'armv7l'
system
"wget -L -O
#{
CREW_DEST_DIR
}
/usr/local/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnamliN0Rld01oRVk&export=download"
system
"sleep 10"
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA1
.
hexdigest
(
File
.
read
(
"
#{
CREW_DEST_DIR
}
/usr/local/bin/gdrive"
)
)
==
'3d670905e13edf96d43c9f97293bdba62c740926'
when
'mips64'
system
"wget -L -O
#{
CREW_DEST_DIR
}
/usr/local/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6Embna2lzdEJ6blFzSzQ&export=download"
system
"sleep 10"
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA1
.
hexdigest
(
File
.
read
(
"
#{
CREW_DEST_DIR
}
/usr/local/bin/gdrive"
)
)
==
'334bbd74b87fd1d05550e366724fe8e3c9e61ca4'
when
'ppc64'
system
"wget -L -O
#{
CREW_DEST_DIR
}
/usr/local/bin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnS09XMzhfRXBnUzA&export=download"
system
"sleep 10"
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA1
.
hexdigest
(
File
.
read
(
"
#{
CREW_DEST_DIR
}
/usr/local/bin/gdrive"
)
)
==
'70a1ac5be9ba819da5cf7a8dbd513805a26509ac'
else
abort
'Unable to install gdrive. Architecture not supported.'
.
lightred
end
system
"sleep 10"
system
"chmod +x
#{
CREW_DEST_DIR
}
/usr/local/bin/gdrive"
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