forked from hortonworks/cloudbreak-deployer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·27 lines (22 loc) · 695 Bytes
/
install
File metadata and controls
executable file
·27 lines (22 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CBD_VERSION=1.16.4
CBD_DIR=cloudbreak-deployer
: ${GIT_ORG:=hortonworks}
: ${GIT_PROJECT:=cloudbreak-deployer}
main() {
mkdir -p $CBD_DIR && cd $_
local osarch=$(uname -sm|tr " " _)
local url="https://github.com/${GIT_ORG}/${GIT_PROJECT}/releases/download/v${CBD_VERSION}/${GIT_PROJECT}_${CBD_VERSION}_${osarch}.tgz"
local dest=/bin
hash -r > /dev/null
if (command -v cbd > /dev/null); then
local existing=$(command -v cbd)
dest=${existing%/*}
else
if echo "$PATH" | grep -q '/usr/local/bin' ; then
dest=/usr/local/bin
fi
fi
curl -Ls $url | tar -xz -C ${dest}
echo "---> cbd installed into ${dest}"
}
main