- if [ -d ${REPO_DIR} ]
- then
- msg "pulling from ${REPO_NAME}"
- run "git fetch origin --tags" ${REPO_DIR}
- run "git fetch origin" ${REPO_DIR}
- run "git merge --ff origin/master" ${REPO_DIR}
- if [ $? -ne 0 ]
- then
- error "Can not fetch from ${MASTER_REPO}"
- fi
- else
- msg "mirroring in ${REPO_NAME} for the first time"
- run "git clone ${MIRROR_REPO}" ${LOCAL_MIRROR_DIR}
- run "git remote add local_master ${MASTER_REPO}" ${REPO_DIR}
- fi
+# if [ -d ${REPO_DIR} ]
+# then
+# msg "pulling from ${REPO_NAME}"
+# run "git fetch origin --tags" ${REPO_DIR}
+# run "git fetch origin" ${REPO_DIR}
+# run "git merge --ff origin/master" ${REPO_DIR}
+# if [ $? -ne 0 ]
+# then
+# error "Can not fetch from ${MASTER_REPO}"
+# fi
+# else
+# msg "mirroring in ${REPO_NAME} for the first time"
+# run "git clone ${MIRROR_REPO}" ${LOCAL_MIRROR_DIR}
+# run "git remote add local_master ${MASTER_REPO}" ${REPO_DIR}
+# fi
+
+ msg "mirroring in ${REPO_NAME} for the first time"
+ run "rm -rf ${REPO_DIR}" ${LOCAL_MIRROR_DIR}
+ run "git clone ${MIRROR_REPO}" ${LOCAL_MIRROR_DIR}
+ run "git remote add local_master ${MASTER_REPO}" ${REPO_DIR}