Fix updating a git working copy when the head is detached
This commit is contained in:
parent
b86876a6ef
commit
7ce6de2ee4
1 changed files with 7 additions and 2 deletions
|
@ -31,12 +31,17 @@ get_book() { #
|
|||
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
|
||||
|
|
Reference in a new issue