Skip to content

Commit e38c0d0

Browse files
author
Samuel Vandamme
committed
* Fixed symlink error and shellcheck
1 parent 7379c82 commit e38c0d0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,32 @@ if [ -z ${COSCALE_APPID+x} ] || [ -z ${COSCALE_TOKEN+x} ]; then
1919
# Check command arguments
2020
if [ -z ${COSCALE_APPID+x} ]; then
2121
echo "Please enter your app id:"
22-
read -e COSCALE_APPID
22+
read -e -r COSCALE_APPID
2323
fi
2424
echo
2525

2626
if [ -z ${COSCALE_TOKEN+x} ]; then
2727
echo "Please enter your access token:"
28-
read -e COSCALE_TOKEN
28+
read -e -r COSCALE_TOKEN
2929
fi
3030
echo
3131
fi
3232

3333
# Detect operation system
3434
echo "### Detecting operating system"
3535
echo
36-
os=`uname -o | awk '{split($0,a,"/"); print tolower(a[2])}'`
36+
os=$(uname -o | awk '{split($0,a,"/"); print tolower(a[2])}')
3737
echo "Operation system: $os"
3838
echo
3939

4040
# Fetch latest release list from Github
4141
echo
4242
echo "## Getting latest release information"
4343
echo
44-
github_data=`curl -s -L https://api.github.com/repos/CoScale/coscale-cli/releases/latest | grep "browser_download_url" | awk '{ print $2; }' | sed 's/"//g'`
44+
github_data=$(curl -s -L https://api.github.com/repos/CoScale/coscale-cli/releases/latest | grep "browser_download_url" | awk '{ print $2; }' | sed 's/"//g')
4545

4646
# Select correct release
47-
release=`echo "$github_data" | grep $os`
47+
release=`echo "$github_data" | grep "$os"`
4848
echo "### Latest release: $release"
4949

5050
# Start install
@@ -67,7 +67,7 @@ echo
6767

6868
# Create symlink from /usr/bin/coscale-cli to /opt/coscale/cli/coscale-cli
6969
echo "### Creating symlink"
70-
ln -v -S /usr/bin/coscale-cli /opt/coscale/cli/coscale-cli
70+
ln -v -s /usr/bin/coscale-cli /opt/coscale/cli/coscale-cli
7171
echo
7272

7373
# Create config

0 commit comments

Comments
 (0)