Git version 1.6.0.4 does not support cloning into existing directorries.
authorW Trevor King <wking@borg3.physics.drexel.edu>
Wed, 30 Nov 2011 15:19:10 +0000 (10:19 -0500)
committerW Trevor King <wking@borg3.physics.drexel.edu>
Wed, 30 Nov 2011 15:19:10 +0000 (10:19 -0500)
dotfiles.sh

index 45c3f974f38986b54868e53e96e0a639c1be0e7b..5927dab410ca2c603df462a02008af50aa121856 100755 (executable)
@@ -253,7 +253,6 @@ function clone()
                echo "ERROR: destination path (${REPO}) already exists." >&2
                return 1
        fi
-       mkdir -p "${REPO}"
        CACHE_SOURCE='yes'
        FETCH='yes'
        case "${TRANSFER}" in
@@ -263,6 +262,7 @@ function clone()
                        "${GIT}" clone "${URL}" "${REPO}" || return 1
                        ;;
                'wget')
+                       mkdir -p "${REPO}"
                        ;;
                *)
                        echo "PROGRAMMING ERROR: add ${TRANSFER} support to clone command" >&2