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
Guillaume Hervier
chromebrew
Commits
ba4ea737
Commit
ba4ea737
authored
Apr 10, 2018
by
Chris Thurber
Committed by
GitHub
Apr 10, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2227 from uberhacker/add-cf-package
Add cf package
parents
9d43fb9b
aab5795c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
packages/cf.rb
packages/cf.rb
+48
-0
No files found.
packages/cf.rb
0 → 100644
View file @
ba4ea737
require
'package'
class
Cf
<
Package
description
'The official command line client for Cloud Foundry'
homepage
'https://docs.cloudfoundry.org/cf-cli'
version
'6.36.1'
source_url
'https://raw.githubusercontent.com/cloudfoundry/cli/v6.36.1/README.md'
source_sha256
'e760fc21cdee6960dbd864e48c08630eabe33af0bb1bb4d412a22d4bb9ac6a06'
binary_url
({
})
binary_sha256
({
})
def
self
.
install
case
ARCH
when
'i686'
system
'wget https://s3-us-west-1.amazonaws.com/cf-cli-releases/releases/v6.36.1/cf-cli_6.36.1_linux_i686.tgz'
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA256
.
hexdigest
(
File
.
read
(
'cf-cli_6.36.1_linux_i686.tgz'
)
)
==
'9e6383521345370e9a266d11ff4f827e853d2dfbf999bcb9e6a0f62ec69c3b0f'
system
'tar xvf cf-cli_6.36.1_linux_i686.tgz'
system
"install -Dm755 cf
#{
CREW_DEST_PREFIX
}
/bin/cf"
system
"curl -o cf.bash https://raw.githubusercontent.com/cloudfoundry/cli/v6.36.1/ci/installers/completion/cf"
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA256
.
hexdigest
(
File
.
read
(
'cf.bash'
)
)
==
'f3f05a2414075c00b101b05f73cf260b9eec9966659adf2957c1b2937bd4c48e'
system
"install -Dm644 cf.bash
#{
CREW_DEST_PREFIX
}
/share/cf/bash-completion/cf.bash"
when
'x86_64'
system
'wget https://s3-us-west-1.amazonaws.com/cf-cli-releases/releases/v6.36.1/cf-cli_6.36.1_linux_x86-64.tgz'
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA256
.
hexdigest
(
File
.
read
(
'cf-cli_6.36.1_linux_x86-64.tgz'
)
)
==
'd5e59258183939305f44c471dab41a000290446399cc9b206b107c7bdb8ce180'
system
'tar xvf cf-cli_6.36.1_linux_x86-64.tgz'
system
"install -Dm755 cf
#{
CREW_DEST_PREFIX
}
/bin/cf"
system
"curl -L -o cf.bash https://raw.githubusercontent.com/cloudfoundry/cli/v6.36.1/ci/installers/completion/cf"
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA256
.
hexdigest
(
File
.
read
(
'cf.bash'
)
)
==
'f3f05a2414075c00b101b05f73cf260b9eec9966659adf2957c1b2937bd4c48e'
system
"install -Dm644 cf.bash
#{
CREW_DEST_PREFIX
}
/share/cf/bash-completion/cf.bash"
end
end
def
self
.
postinstall
case
ARCH
when
'i686'
,
'x86_64'
puts
puts
"To add bash completion, execute the following:"
.
lightblue
puts
"echo 'if [ -f
#{
CREW_PREFIX
}
/share/cf/bash-completion/cf.bash ]; then' >> ~/.bashrc"
.
lightblue
puts
"echo ' source
#{
CREW_PREFIX
}
/share/cf/bash-completion/cf.bash' >> ~/.bashrc"
.
lightblue
puts
"echo 'fi' >> ~/.bashrc"
.
lightblue
puts
"source ~/.bashrc"
.
lightblue
puts
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