ignore trailing slashes for comparison of source

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
remotes/origin/feature_files_export
Steven Armstrong 11 years ago
parent 301b4e18ff
commit 5ec617fa3e
  1. 3
      cdist/conf/type/__link/explorer/state

@ -35,7 +35,8 @@ case "$type" in
cd "$destination_dir"
source_is=$(ls -l "$destination" | sed 's/.*-> //g')
if [ -h "$destination" ]; then
if [ "$source_is" = "$source" ]; then
# ignore trailing slashes for comparison
if [ "${source_is%/}" = "${source%/}" ]; then
echo present
else
echo wrongsource

Loading…
Cancel
Save