Determine source_is only if destination is symlink.
This commit is contained in:
parent
6895ad0207
commit
e860f1c792
1 changed files with 1 additions and 1 deletions
|
@ -33,8 +33,8 @@ destination_dir="${destination%/*}"
|
|||
case "$type" in
|
||||
symbolic)
|
||||
cd "$destination_dir" || exit 1
|
||||
source_is=$(readlink "$destination")
|
||||
if [ -h "$destination" ]; then
|
||||
source_is=$(readlink "$destination")
|
||||
# ignore trailing slashes for comparison
|
||||
if [ "${source_is%/}" = "${source%/}" ]; then
|
||||
echo present
|
||||
|
|
Loading…
Reference in a new issue