chiark / gitweb /
Make error messages more useful.
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Sat, 5 Mar 2005 19:55:27 +0000 (19:55 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Sat, 5 Mar 2005 19:55:27 +0000 (19:55 +0000)
svn-takeover

index f18c541..bdde07f 100755 (executable)
@@ -7,10 +7,12 @@ if [ -z "$1" ]; then
 fi
 
 for x in `find . -name .svn -prune -o -type d -print`; do
-    if [ -d "$1/$x/.svn" ] && [ ! -d "$x/.svn" ]; then
-       cp -a "$1/$x/.svn" "$x/"
+    if [ ! -d "$1/$x/.svn" ]; then
+       echo "Not taking over $x; $1/$x/.svn missing." >&2
+    elif [ -d "$x/.svn" ]; then
+       echo "Not taking over $x; $x/.svn present." >&2
     else
-       echo "Not taking over $x; $1/$x/.svn missing or $x/.svn present." >&2
+       cp -a "$1/$x/.svn" "$x/"
     fi
 done