update.operations: fixup usage of check_link
authorTero Marttila <terom@paivola.fi>
Thu, 18 Sep 2014 21:15:30 +0300
changeset 625 57e4f48a7140
parent 624 889ecd6dcb4e
child 626 5cd99761fe4d
update.operations: fixup usage of check_link
lib/update.operations
lib/update.updates
--- a/lib/update.operations	Thu Sep 18 21:13:23 2014 +0300
+++ b/lib/update.operations	Thu Sep 18 21:15:30 2014 +0300
@@ -8,12 +8,11 @@
     local tgt="$2"
 
     if check_link "$out" "$tgt"; then
+        log_skip "Linking $out -> $tgt: not changed"
+    else
         log_update "Linking $out -> $tgt..."
 
         do_link "$out" "$tgt"
-
-    else
-        log_skip "Linking $out -> $tgt: not changed"
     fi
 }
 
--- a/lib/update.updates	Thu Sep 18 21:13:23 2014 +0300
+++ b/lib/update.updates	Thu Sep 18 21:15:30 2014 +0300
@@ -97,7 +97,7 @@
 #   check_link $lnk $tgt && do_link $lnk $tgt || ...
 #
 # Tests if the symlink exists, and the target matches.
-# Fails if the target does not exist.
+# Fails if the symlink needs updating.
 function check_link {
     local out="$1"
     local tgt="$2"