From 7a40bc83128839338ef419684700e345f879673a Mon Sep 17 00:00:00 2001
From: Tomas Plesnik <plesnik@ics.muni.cz>
Date: Mon, 5 Jan 2015 08:45:23 +0100
Subject: [PATCH] uprava informativnich hlasek a napovedy

---
 src/warden-server/sh/install.sh   | 14 +++++++-------
 src/warden-server/sh/uninstall.sh | 12 +++++++-----
 src/warden-server/sh/update.sh    | 14 +++++++-------
 3 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/src/warden-server/sh/install.sh b/src/warden-server/sh/install.sh
index a37aed6..7175561 100755
--- a/src/warden-server/sh/install.sh
+++ b/src/warden-server/sh/install.sh
@@ -14,13 +14,13 @@ VERSION="2.2"
 #-------------------------------------------------------------------------------
 usage()
 {
-	echo "Usage: ${0##*/} -d <directory> -k <ssl_key_file> -c <ssl_cert_file> -a <ssl_ca_file> -e <email_address> [-s <directory>] [-hV]"
-	echo "-d <directory>            installation directory of Warden server"
-	echo "-k <ssl_key_file>         path to SSL certificate key file"
-	echo "-c <ssl_cert_file>        path to SSL certificate file"
-	echo "-a <ssl_ca_file>          path to CA certificate file"
+	echo "Usage: ${0##*/} -d <directory> -k <ssl_key> -c <ssl_cert> -a <ssl_ca_cert> -e <email_address> [-s <directory>] [-hV]"
+	echo "-d <directory>            Warden server installation directory"
+	echo "-k <ssl_key>              path to SSL key"
+	echo "-c <ssl_cert>             path to SSL certificate"
+	echo "-a <ssl_ca_cert>          path to SSL CA certificate"
 	echo "-e <e-mail address>       e-mail address to Warden server administrator"
-	echo "-s <directory>            directory for symlinks to Warden server control scripts (optional)"
+	echo "-s <directory>            directory of symlinks to system control scripts (optional)"
 	echo "-h                        print this help"
 	echo "-V                        print script version number and exit"
 	echo
@@ -175,7 +175,7 @@ createManifest()
 
 createSymlinks()
 {
-	echo -n "Checking symbolic links directory $symbin ... "
+	echo -n "Checking symlinks directory $symbin ... "
 	if [[ -d $symbin && -w $symbin ]]; then
 		echo "OK"
 		for file in "${bin}/"*
diff --git a/src/warden-server/sh/uninstall.sh b/src/warden-server/sh/uninstall.sh
index fafaeaf..9a5adf7 100755
--- a/src/warden-server/sh/uninstall.sh
+++ b/src/warden-server/sh/uninstall.sh
@@ -15,8 +15,8 @@ VERSION="2.2"
 usage()
 {
 	echo "Usage: ${0##*/} -d <directory> [-s <directory>] [-hV]"
-	echo "-d <directory>            uninstallation directory of Warden server"
-	echo "-s <directory>            directory for symlinks to Warden server control scripts (optional)"
+	echo "-d <directory>            Warden server to uninstall"
+	echo "-s <directory>            directory of symlinks to system control scripts (optional)"
 	echo "-h                        print this help"
 	echo "-V                        print script version number and exit"
 	echo
@@ -125,13 +125,15 @@ createBackup()
 
 removeSymlinks()
 {
-	echo -n "Checking symbolic links directory $symbin ... "
+	echo -n "Checking symlinks directory $symbin ... "
 	if [[ -d $symbin && -w $symbin ]]; then
 		echo "OK"
 		for file in "$bin/"*
 		do
-			echo "- removing symlink: ${symbin}/${file##*/} -> $file"
-			rm -f "${symbin}/${file##*/}" 2> /dev/null
+			if [[ -f "${symbin}/${file##*/}" ]]; then
+				echo "- removing symlink: ${symbin}/${file##*/} -> $file"
+				rm -f "${symbin}/${file##*/}" 2> /dev/null
+			fi
 		done
 	else
 		echo "FAILED!"
diff --git a/src/warden-server/sh/update.sh b/src/warden-server/sh/update.sh
index 1c70ff5..a9a5ad8 100755
--- a/src/warden-server/sh/update.sh
+++ b/src/warden-server/sh/update.sh
@@ -14,13 +14,13 @@ VERSION="2.2"
 #-------------------------------------------------------------------------------
 usage()
 {
-	echo "Usage: ${0##*/} -d <directory> [-hV]"
-	echo "-d <directory>            destination directory of Warden server"
-	echo "-s <directory>            directory for symlinks to Warden server control scripts (optional)"
+	echo "Usage: ${0##*/} -d <directory> [-s <directory>] [-hV]"
+	echo "-d <directory>            Warden server to update"
+	echo "-s <directory>            directory of symlinks to system control scripts (optional)"
 	echo "-h                        print this help"
 	echo "-V                        print script version number and exit"
 	echo
-	echo "Example: $ ./${0##*/} -d /opt/warden-server"
+	echo "Example: $ ./${0##*/} -d /opt/warden-server -s /usr/local/bin"
 	echo
 	echo "For more information about update process, see README file (section Update)."
 	echo
@@ -202,7 +202,7 @@ removeOldFiles()
 
 createManifest()
 {
-        echo -n "Creating MANIFEST file ... "
+        echo -n "Creating new MANIFEST file ... "
         cd "$basedir" && find . -mindepth 2 -type f | sed 's/.\///' | sort > "${doc}/MANIFEST" && cd $OLDPWD 2> "$err" || errClean
         echo "OK"
 }
@@ -210,12 +210,12 @@ createManifest()
 
 createSymlinks()
 {
-        echo -n "Checking symbolic links directory $symbin ... "
+        echo -n "Checking symlinks directory $symbin ... "
 	if [[ -d $symbin && -w $symbin ]]; then
 		echo "OK"
 	        for file in "${bin}/"*
 		do
-			echo "- making symlink: ${symbin}/${file##*/} -> $file"
+			echo "- updating symlink: ${symbin}/${file##*/} -> $file"
 			ln -s "$file" "${symbin}/${file##*/}"
 	        done
 	else
-- 
GitLab