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
adf1c143
Commit
adf1c143
authored
Nov 22, 2017
by
Damian Montero
Committed by
GitHub
Nov 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1420 from uberhacker/add-google_cloud_sdk-package
Add google_cloud_sdk package
parents
7c0d5108
0cbed238
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
packages/google_cloud_sdk.rb
packages/google_cloud_sdk.rb
+49
-0
No files found.
packages/google_cloud_sdk.rb
0 → 100644
View file @
adf1c143
require
'package'
class
Google_cloud_sdk
<
Package
description
'Command-line interface for Google Cloud Platform products and services'
homepage
'https://cloud.google.com/sdk/'
version
'179.0.0'
case
ARCH
when
'i686'
source_url
'https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-179.0.0-linux-x86.tar.gz'
source_sha256
'9aa61b596fc7a247643bf42f5d2ce153d46da79b136f0723055ad1a2864aba46'
when
'x86_64'
source_url
'https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-179.0.0-linux-x86_64.tar.gz'
source_sha256
'7852ec02a38453ed11707646123994e5714a8ffd7cf3b401f4c963aadba8ed14'
else
puts
'Unable to install google_cloud_sdk. Supported architectures include i686 and x86_64 only.'
.
lightred
end
binary_url
({
})
binary_sha256
({
})
depends_on
'python27'
unless
File
.
exists?
"
#{
CREW_PREFIX
}
/bin/python"
def
self
.
install
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/share/google_cloud_sdk"
system
"cp -r .
#{
CREW_DEST_PREFIX
}
/share/google_cloud_sdk"
FileUtils
.
cd
(
"
#{
CREW_DEST_PREFIX
}
/share/google_cloud_sdk"
)
do
system
"./install.sh \
--usage-reporting false \
--rc-path $HOME/.bashrc \
--quiet"
end
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/bin"
FileUtils
.
cd
(
"
#{
CREW_DEST_PREFIX
}
/share/google_cloud_sdk/bin"
)
do
system
"find . -exec ln -s
#{
CREW_PREFIX
}
/share/google_cloud_sdk/bin/{}
#{
CREW_DEST_PREFIX
}
/bin
\\
;"
end
system
"sed -i 's,
#{
CREW_DEST_DIR
}
,,g' $HOME/.bashrc"
end
def
self
.
postinstall
puts
puts
"To finish the installation, execute the following:"
.
lightblue
puts
"exec -l
\$
SHELL"
.
lightblue
puts
"gcloud init"
.
lightblue
puts
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