utils: remove existing cloog and isl dirs before git cloning
authorSebastian Pop <spop@codeaurora.org>
Sat, 17 Nov 2012 03:43:48 +0000 (03:43 +0000)
committerSebastian Pop <spop@codeaurora.org>
Sat, 17 Nov 2012 03:43:48 +0000 (03:43 +0000)
Patch adapted from "Dmitry N. Mikushin" <maemarcus@gmail.com>.

llvm-svn: 168250

polly/utils/checkout_cloog.sh

index 971c027..27c977a 100755 (executable)
@@ -65,6 +65,8 @@ ISL_DIR=${CLOOG_DIR}/isl
 if [ ${IS_GIT} -eq 0 ]
 then
   echo :: Performing initial checkout
+  # Remove the existing CLooG and ISL dirs to avoid crashing older git versions.
+  run rm -rf ${CLOOG_DIR} ${ISL_DIR}
   run git clone http://repo.or.cz/r/cloog.git ${CLOOG_DIR}
   run git clone http://repo.or.cz/r/isl.git ${ISL_DIR}
 fi