From 16a5c8b09569615a30487ac7fb5b605533c4ad3f Mon Sep 17 00:00:00 2001 From: Tomas Plesnik <plesnik@ics.muni.cz> Date: Sat, 3 Jan 2015 09:54:15 +0100 Subject: [PATCH] pridana kontrola adresare pro umisteni symlinku --- src/warden-server/sh/install.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/warden-server/sh/install.sh b/src/warden-server/sh/install.sh index 32c1bea..c0656c5 100755 --- a/src/warden-server/sh/install.sh +++ b/src/warden-server/sh/install.sh @@ -175,12 +175,18 @@ createManifest() createSymlinks() { - echo "Creating symbolic links to $symbin ..." - for file in "${bin}/"* - do - echo "- creating symlink: ${symbin}/${file##*/} -> $file" - ln -s "$file" "${symbin}/${file##*/}" 2>/dev/null - done + echo -n "Creating symbolic links to $symbin ..." + if [[ -d $symbin && -w $symbin ]]; then + echo "OK" + for file in "${bin}/"* + do + echo "- creating symlink: ${symbin}/${file##*/} -> $file" + ln -s "$file" "${symbin}/${file##*/}" 2>/dev/null + done + else + echo "FAILED!" + fi + } -- GitLab