Skip to content

Commit 6ccaf36

Browse files
author
Samuel Vandamme
committed
+ More output
1 parent 877e88d commit 6ccaf36

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

install.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,39 @@ if [ -z ${COSCALE_TOKEN+x} ]; then
1717
fi
1818

1919
# Fetch latest release list from Github
20+
echo "Getting latest release information"
2021
github_data=`curl -s -L https://api.github.com/repos/CoScale/coscale-cli/releases/latest | python -c 'import json,sys;obj=json.load(sys.stdin); releases = [release["browser_download_url"] for release in obj["assets"]]; print "\n".join(releases)'`
2122

2223
# Detect operation system
24+
echo "Detecting operation system"
2325
os=`uname -o | awk '{split($0,a,"/"); print tolower(a[2])}'`
2426

2527
# Select correct release
2628
release=`echo "$github_data" | grep $os`
2729

2830
# Create dirs
31+
echo "Creating directories /opt/coscale/cli"
2932
mkdir -p /opt/coscale/cli
3033
pushd /opt/coscale/cli
3134

3235
# Install client
36+
echo "Downloading client to /opt/coscale/cli/coscale-cli"
3337
curl -L "$release" > coscale-cli
3438
chmod +x coscale-cli
3539

3640
# Add to $PATH
41+
echo "Adding coscale-cli to $PATH in /root/.bashrc"
3742
echo "export PATH=\"${PATH}:/opt/coscale/cli\"" >> /root/.bashrc
3843
source /root/.bashrc
3944

4045
# Create config
46+
echo "Creating config"
4147
echo "{\"baseurl\":\"https://api.coscale.com\", \"appid\":\"$COSCALE_APPID\", \"accesstoken\":\"$COSCALE_TOKEN\"}" | gzip -c > /opt/coscale/cli/api.conf
4248

4349
# Test config
50+
echo "Testing configuration"
4451
coscale-cli event list
52+
53+
# Done
54+
echo "Done, you can now start using the CoScale CLI tool"
55+
popd

0 commit comments

Comments
 (0)