r3726 - jhalfs/trunk/common/libs

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Sun Sep 22 00:14:33 PDT 2013


Author: pierre
Date: Sun Sep 22 00:14:33 2013
New Revision: 3726

Log:
Fix updating a git working copy when the head is detached

Modified:
   jhalfs/trunk/common/libs/func_book_parser

Modified: jhalfs/trunk/common/libs/func_book_parser
==============================================================================
--- jhalfs/trunk/common/libs/func_book_parser	Sat Sep 21 12:02:11 2013	(r3725)
+++ jhalfs/trunk/common/libs/func_book_parser	Sun Sep 22 00:14:33 2013	(r3726)
@@ -31,12 +31,17 @@
         if [ ! $TREE == "development" ]; then
            cd ${PROGNAME}-$LFSVRS
            echo "Checking out $LFSVRS at $PWD in $TREE"
-           git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
+           git checkout -b ${TREE} ${TREE} >>$LOGDIR/$LOG 2>&1
         fi
     else
       cd ${PROGNAME}-$LFSVRS
       case $PROGNAME in
-        clfs*)  git pull >>$LOGDIR/$LOG 2>&1 ;;
+        clfs*)  git checkout master >>$LOGDIR/$LOG 2>&1
+                git pull >>$LOGDIR/$LOG 2>&1
+                if [ ! $TREE == "development" ]; then
+                   git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
+                fi
+        ;;
         lfs | hlfs) svn up >>$LOGDIR/$LOG 2>&1 ;;
         *) ;;
       esac



More information about the alfs-log mailing list