- Timestamp:
- 04/30/2021 12:21:44 PM (3 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- dfab075
- Parents:
- dd5d63d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/libs/func_book_parser
rdd5d63d rde67016 10 10 if [ -z $WORKING_COPY ] ; then 11 11 # Check for Subversion or git instead of just letting the script fail. 12 test `type -p git` || eval "echo \"This feature requires Git.\" 13 exit 1" 14 15 echo -n "Downloading the $PROGNAME document, $LFSVRS version... " 16 12 17 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 23 echo -n "Downloading the $PROGNAME document, $LFSVRS version... " 24 25 case $PROGNAME in 26 lfs) svn_root="LFS" ;; 27 hlfs) svn_root="HLFS" ;; 18 lfs) git_root="lfs.git" ;; 28 19 clfs*) ;; 29 20 *) echo "BOOK not defined in function <get_book>" … … 33 24 # repo. If we've already extracted the commands, move on to getting the 34 25 # sources. 35 if [ $PROGNAME == "lfs" ] || [ $PROGNAME == "hlfs" ] && 36 [ ! -d ${PROGNAME}-${LFSVRS}/.svn ]; then 37 svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 38 elif [ $PROGNAME == "clfs" ] || [ $PROGNAME == "clfs2" ] || 39 [ $PROGNAME == "clfs3" ] && [ ! -d ${PROGNAME}-${LFSVRS}/.git ]; then 40 echo $TREE 26 if [ ! -d ${PROGNAME}-${LFSVRS}/.git ]; then 41 27 git clone $GIT ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 42 28 if [ ! $TREE == "development" ]; then … … 48 34 else 49 35 cd ${PROGNAME}-$LFSVRS 50 case $PROGNAME in 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 59 ;; 60 lfs | hlfs) svn up >>$LOGDIR/$LOG 2>&1 ;; 61 *) ;; 62 esac 36 # If the repo is in "detached head" state, git pull fails, so get 37 # back first to master: 38 git checkout trunk >>$LOGDIR/$LOG 2>&1 39 git pull >>$LOGDIR/$LOG 2>&1 40 if [ ! $TREE == "development" ]; then 41 git checkout ${TREE} >>$LOGDIR/$LOG 2>&1 42 fi 63 43 fi 64 44 echo -ne "done\n"
Note:
See TracChangeset
for help on using the changeset viewer.