chiark / gitweb /
cvs-repomove fixed for moving back to a place it's already been
[chiark-utils.git] / scripts / cvs-repomove
index cc50c2579a9447668ebc77a3f4f7f8e3c70f0a4c..62f850ef6037c85ab5ea7d9e8888ec2aca64439e 100755 (executable)
@@ -97,10 +97,10 @@ do_move () {
  set +e
  previously=\"$(ls -d -- $srcrepo/$module..moved-to-* 2>/dev/null)\"
  set -e
- if [ \"x$previously\" != x ]; then
-  echo \"    btw, module was once before moved away from here\"
-  mv -- \"$previously\" \
-   \"${previously/..moved-to-/..previously-\$(date +%s)-moved-to-}\"
+ if [ \"x\$previously\" != x ]; then
+  echo >&2 \"    btw, module was once before moved away from here\"
+  mv -- \"\$previously\" \
+   \"\${previously/..moved-to-/..previously-\$(date +%s)-moved-to-}\"
  fi
  echo \$resume
        '")"