From 767c55e8fb195e69e76cc746ea32a4e0a5bac9a6 Mon Sep 17 00:00:00 2001
From: Armand Bahi <armand.bahi@veremes.com>
Date: Mon, 15 Oct 2018 14:32:11 +0000
Subject: [PATCH] Update utils/init_symlinks.sh

---
 utils/init_symlinks.sh | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/utils/init_symlinks.sh b/utils/init_symlinks.sh
index 5fa28556..0941f2b0 100755
--- a/utils/init_symlinks.sh
+++ b/utils/init_symlinks.sh
@@ -21,12 +21,12 @@ cd ..
 
 # Vitis
 echo "---- Link vitis ----"
-if [ "$(pwd)/client" ]; then
-	rm client
+if [ -f "$(pwd)/client" ]; then
+	rm $(pwd)/client
 fi
 ln -rsf src/vitis/client client
-if [ "$(pwd)/vas" ]; then
-	rm vas
+if [ -f "$(pwd)/vas" ]; then
+	rm $(pwd)/vas
 fi
 ln -rsf src/vitis/vas vas
 
@@ -46,7 +46,7 @@ if [[ $depsCount > 0 ]]; then
 	for (( i=1; i <= $depsCount; i++ )); do
 		if [ ${aDeps[$i, nature]} == "modules" ]; then
 			if [ ${aDeps[$i, name]:0:7} == "module_" ]; then
-				module = ${aDeps[$i, name]:7}
+				module=${aDeps[$i, name]:7}
 				echo "---- Link module_${module} ----"
 				if [ -d "$(pwd)/src/module_${module}/module" ]; then
 					if [ -f "src/vitis/client/modules/${module}" ]; then
@@ -91,17 +91,17 @@ if [[ $depsCount > 0 ]]; then
 	if [ -d "${APP_EXISTING_PATH}" ]; then
 		echo "---- Link exixting app ${APP_EXISTING_PATH} ----"
 
-		existing_folders_path[0] = "vas/server"
-		existing_folders_path[1] = "vas/log"
-		existing_folders_path[2] = "vas/public"
-		existing_folders_path[3] = "vas/shared"
-		existing_folders_path[4] = "vas/tmp"
-		existing_folders_path[5] = "vas/upload"
-		existing_folders_path[6] = "vas/ws_data"
+		existing_folders_path[0]="vas/server"
+		existing_folders_path[1]="vas/log"
+		existing_folders_path[2]="vas/public"
+		existing_folders_path[3]="vas/shared"
+		existing_folders_path[4]="vas/tmp"
+		existing_folders_path[5]="vas/upload"
+		existing_folders_path[6]="vas/ws_data"
 
-		existing_folders_path[8] = "vas/rest/conf"
-		file_existing_path[0] = "client/conf/properties.json"
-		file_existing_path[1] = "vas/rest/.htaccess"
+		existing_folders_path[8]="vas/rest/conf"
+		file_existing_path[0]="client/conf/properties.json"
+		file_existing_path[1]="vas/rest/.htaccess"
 
 		# for i in "${arrayName[@]}" do
 		#
-- 
GitLab