- if test -d "$srcrepo/$module..$movingto"; then
- echo " resuming previous attempt at a move"
- resume=true
- if test -d "$srcrepo/$module"; then
- fail "but $srcrepo/$module exists too"
- fi
- else
- resume=false
- ls -d -- "$srcrepo/$module" >/dev/null
- fi
-
- 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-}"
- fi
+ resume="$("$CVS_RSH" "$srchost" bash -ec "'
+ if test -d $srcrepo/$module..$movingto; then
+ echo >&2 \" resuming previous attempt at a move\"
+ resume=true
+ if test -d $srcrepo/$module; then
+ echo >&2 \"but $srcrepo/$module exists too\"
+ exit 1
+ fi
+ else
+ resume=false
+ ls -d -- $srcrepo/$module >/dev/null
+ fi
+ set +e
+ previously=\"$(ls -d -- $srcrepo/$module..moved-to-* 2>/dev/null)\"
+ set -e
+ 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
+ '")"