[Crossfire-wiki] [Crossfire DokuWiki] page changed: user:kbulgrien

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Tue May 12 23:37:09 CDT 2009


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2009/05/12 23:37
User        : kbulgrien
Edit Summary: Add svn-up.sh updated to use svn-co.sh style parameters.

@@ -25,9 +25,8 @@
  ====Portable C/C++====
      * [[http://www.gnu.org/software/automake/manual/autoconf/Portable-C-and-C_002b_002b.html#Portable-C-and-C_002b_002b|Automake Manual Chapter]]
  
  =====SVN Scripts=====
- 
  
  ====svn-co.sh====
  
  This script can do svn 1.5.x sparse checkouts or pre-1.5 checkouts.  The script defaults to using subversion 1.5+ sparse checkouts.  If an older client is detected, the script switches to a legacy checkout directory model.
@@ -152,8 +151,76 @@
    # Link the arch directory into the server directory tree.
    #
    unlink $(pwd)/server/${COTYPE}/lib/arch 2>/dev/null
    ln -s $(pwd)/arch/${COTYPE} $(pwd)/server/${COTYPE}/lib/arch
+   echo
+ 
+ ====svn-up.sh====
+ 
+ This script is only used for SVN clients of a lower version number than 1.5, or when a non-sparse checkout is used.
+ 
+   #!/bin/bash
+   #
+   # A Crossfire RPG project SVN checkout utility.
+   #
+   # $RCSfile: svn-up.sh,v $ $Revision: 1.3 $ $Date: 2009/05/13 03:28:08 $
+   #
+   # Determine what to checkout based on the command-line parameters and whether
+   # or not we are in an rpmbuild directory or not.  jxclient and metaserver
+   # areas are not applicable to the rpmbuild processes.
+   #
+   if [ "$(pwd)" = "$(pwd | sed -e s/rpmbuild//)" ]
+   then
+     allmodules="arch client jxclient maps metaserver server sounds"
+   else
+     allmodules="arch client maps server sounds"
+   fi
+   branchmodules="arch client maps server"
+   
+   if [ "${1}" = "trunk" ]
+   then
+     COTYPE="trunk"
+     shift 1
+   elif [ "${1}" = "branch" ]
+   then
+     COTYPE="branches/"
+     if [ -z "${2}" ]
+     then
+       echo -e "\nsvn-co.sh: Error: Specify branch version.\n"
+       exit 1;
+     else
+       COTYPE="branches/${2}"
+       allmodules="${branchmodules}"
+     fi
+     shift 2
+   else
+     echo -e "\nsvn-co.sh: Error: Usage:\n"
+     echo -e "  svn-co.sh trunk"
+     echo -e "  svn-co.sh branch 1.xx"
+     echo -e "    where xx = the branch number.\n"
+     exit 1;
+   fi
+   
+   CWD=$(pwd)
+   for co in ${allmodules}
+   do
+     WORKING="${co}/${COTYPE}"
+     if [ -d ${CWD}/${WORKING} ]
+     then
+       echo; echo ${WORKING}; echo
+       cd ${CWD}/${WORKING}
+       svn update
+       cd ${CWD}
+     fi
+   done
+   if [ "${COTYPE}" != "trunk" ]
+   then
+     WORKING="sounds/trunk}"
+     echo; echo ${WORKING}; echo
+     cd ${CWD}/${WORKING}
+     svn update
+     cd ${CWD}
+   fi
    echo
  
  =====Configure Scripts=====
  


IP-Address  : 68.90.128.197
Old Revision: http://wiki.metalforge.net/doku.php/user:kbulgrien?rev=1242187952
New Revision: http://wiki.metalforge.net/doku.php/user:kbulgrien

-- 
This mail was generated by DokuWiki at
http://wiki.metalforge.net/




More information about the crossfire-wiki mailing list