]> https://gitweb.dealii.org/ - candi.git/commitdiff
Correctly checkout the desired version for git repositories 189/head
authorFabian Castelli <fabian.castelli@kit.edu>
Thu, 17 Jun 2021 16:56:55 +0000 (18:56 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Thu, 17 Jun 2021 16:56:55 +0000 (18:56 +0200)
candi.sh

index 0f49fa64b454dd592fb5a988ccf347aa109243de..fb2689976459d775ae51e7c03dd5ce98d2bf5607 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -335,20 +335,22 @@ package_fetch () {
         quit_if_fail "candi: download_archive ${NAME}${PACKING} failed"
 
     elif [ ${PACKING} = "git" ]; then
+        # Go into the unpack dir
         cd ${UNPACK_PATH}
-        # Suitably clone or update git repositories
+
+        # Clone the git repository if not existing locally
         if [ ! -d ${EXTRACTSTO} ]; then
             git clone ${SOURCE}${NAME} ${EXTRACTSTO}
             quit_if_fail "candi: git clone ${SOURCE}${NAME} ${EXTRACTSTO} failed"
-        else
-            cd ${EXTRACTSTO}
-            git checkout ${VERSION} --force
-            quit_if_fail "candi: git checkout ${VERSION} --force failed"
-
-            git pull
-            quit_if_fail "candi: git pull failed"
-            cd ..
         fi
+
+        # Checkout the desired version
+        cd ${EXTRACTSTO}
+        git checkout ${VERSION} --force
+        quit_if_fail "candi: git checkout ${VERSION} --force failed"
+
+        # Switch to the tmp dir
+        cd ..
     elif [ ${PACKING} = "hg" ]; then
         cd ${UNPACK_PATH}
         # Suitably clone or update hg repositories

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.