We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5f632e commit d345481Copy full SHA for d345481
install.sh
@@ -67,7 +67,19 @@ echo
67
68
# Create symlink from /usr/bin/coscale-cli to /opt/coscale/cli/coscale-cli
69
echo "### Creating symlink"
70
-ln -v -s /opt/coscale/cli/coscale-cli /usr/bin/coscale-cli
+# Check if file exists
71
+if [ -f "/usr/bin/coscale-cli" ]; then
72
+ # Check if symlink is correct
73
+ if [ "$(readlink /usr/bin/coscale-cli)" = "/opt/coscale/cli/coscale-cli" ]; then
74
+ echo "Correct symlink detected"
75
+ else
76
+ echo "Incorrect symlink detected, please the file /usr/bin/coscale-cli and start again"
77
+ exit 1
78
+ fi
79
+else
80
+ # Symlink does not exist, create
81
+ ln -v -s /opt/coscale/cli/coscale-cli /usr/bin/coscale-cli
82
+fi
83
echo
84
85
# Create config
0 commit comments