fix a shell conditional
authorGreg Price <price@mit.edu>
Sat, 3 Jan 2009 05:59:58 +0000 (00:59 -0500)
committerGreg Price <price@mit.edu>
Sat, 3 Jan 2009 05:59:58 +0000 (00:59 -0500)
svn path=/trunk/scripts/git-migration/; revision=1957

git-migrate-fast.sh

index d4a8cdd..1f977bd 100755 (executable)
@@ -16,9 +16,10 @@ done
 svn-all-fast-export --identity-map ../authors ../rules "$SVN"
 
 sed -n 's/^create repository // p' ../rules | while read repo; do
 svn-all-fast-export --identity-map ../authors ../rules "$SVN"
 
 sed -n 's/^create repository // p' ../rules | while read repo; do
-    ! [ -e "$repo/refs/heads/tags" ] || \
-       cp -a "$repo/refs/heads/tags/." "$repo/refs/tags" && \
-       rm -rf "$repo/refs/heads/tags"
+    if [ -e "$repo/refs/heads/tags" ]; then
+        cp -a "$repo/refs/heads/tags/." "$repo/refs/tags"
+        rm -rf "$repo/refs/heads/tags"
+    fi
 done
 
 pushd packages/invirt-remote.git
 done
 
 pushd packages/invirt-remote.git