Changeset de57ef4 for common/libs/func_book_parser
- Timestamp:
- 04/01/2017 11:05:15 AM (7 years ago)
- Branches:
- 2.4, ablfs-more, legacy, trunk
- Children:
- 8d56c87
- Parents:
- 6bba83f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/libs/func_book_parser
r6bba83f rde57ef4 9 9 10 10 if [ -z $WORKING_COPY ] ; then 11 # Check for Subversion instead of just letting the script hit 'svn' and fail. 12 test `type -p svn` || eval "echo \"This feature requires Subversion.\" 13 exit 1" 11 # Check for Subversion or git instead of just letting the script fail. 12 case $PROGNAME in 13 lfs | hlfs) 14 test `type -p svn` || eval "echo \"This feature requires Subversion.\" 15 exit 1" 16 ;; 17 clfs*) 18 test `type -p git` || eval "echo \"This feature requires Git.\" 19 exit 1" 20 ;; 21 esac 22 14 23 echo -n "Downloading the $PROGNAME document, $LFSVRS version... " 15 24 … … 32 41 git clone $GIT ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 33 42 if [ ! $TREE == "development" ]; then 34 cd ${PROGNAME}-$LFSVRS43 pushd ${PROGNAME}-$LFSVRS > /dev/null 35 44 echo "Checking out $LFSVRS at $PWD in $TREE" 36 45 git checkout ${TREE} >>$LOGDIR/$LOG 2>&1 46 popd > /dev/null 37 47 fi 38 48 else 39 49 cd ${PROGNAME}-$LFSVRS 40 50 case $PROGNAME in 41 clfs*) git pull >>$LOGDIR/$LOG 2>&1 42 if [ ! $TREE == "development" ]; then 43 git checkout ${TREE} >>$LOGDIR/$LOG 2>&1 44 fi 51 clfs*) 52 # If the repo is in "detached head" state, git pull fails, so get 53 # back first to master: 54 git checkout master >>$LOGDIR/$LOG 2>&1 55 git pull >>$LOGDIR/$LOG 2>&1 56 if [ ! $TREE == "development" ]; then 57 git checkout ${TREE} >>$LOGDIR/$LOG 2>&1 58 fi 45 59 ;; 46 60 lfs | hlfs) svn up >>$LOGDIR/$LOG 2>&1 ;; … … 50 64 echo -ne "done\n" 51 65 52 else 66 else # Working copy 53 67 echo -ne "Using $BOOK as book's sources ...\n" 54 68 fi
Note:
See TracChangeset
for help on using the changeset viewer.