Changeset 19336 for trunk/base
- Timestamp:
- Aug 30, 2006, 2:42:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/portmgr/IndexRegen.sh
r15686 r19336 6 6 # e-mail: jmpp@opendarwin.org 7 7 # Updated by Paul Guyot, <pguyot@kallisys.net> 8 # $Id: IndexRegen.sh,v 1.3 2006/01/04 17:00:32 pguyot Exp $ 8 # Updated for svn by Daniel J. Luke <dluke@geeklair.net> 9 # $Id: IndexRegen.sh,v 1.1 2005/12/06 20:47:42 jmpp Exp $ 9 10 #### 10 11 11 12 # Configuration 12 LOCKFILE=/tmp/.dp_ index_regen.lock13 LOCKFILE=/tmp/.dp_svn_index_regen.lock 13 14 # ROOT directory, where everything is. This must exist. 14 ROOT=/Users/pguyot/dp-portindex 15 # SSH key. This must exist. 16 SSH_KEY=${ROOT}/id_dsa 15 ROOT=/Users/dluke/Projects/dp_svn_index_regen 17 16 # DP user. 18 DP_USER= pguyot17 DP_USER=dluke 19 18 # DP group. 20 DP_GROUP=darwinports 21 # CVS user. 22 CVS_USER=pguyot 19 DP_GROUP=staff 23 20 # e-mail address to spam in case of failure. 24 SPAM_LOVERS=portmgr@opendarwin.org 21 SPAM_LOVERS=portmgr@opendarwin.org,dluke@geeklair.net 25 22 26 23 # Other settings (probably don't need to be changed). 27 # CVS root. 28 CVS_ROOT=:ext:${CVS_USER}@cvs.opendarwin.org:/Volumes/src/cvs/od 29 #CVS_ROOT=/Volumes/src/cvs/od # <-- direct access on the same box. 30 # CVS module. 31 CVS_MODULE=darwinports 32 # Wrapper. This gets created. 33 SSH_WRAPPER=${ROOT}/ssh_wrapper 24 SVN_URL=https://svn.macosforge.org/repository/macports/trunk/ 25 SVN_CONFIG_DIR=${ROOT}/svnconfig 34 26 # Where to checkout the source code. This gets created. 35 27 TREE=${ROOT}/source … … 39 31 TCLPKG=${PREFIX}/lib/tcl 40 32 # Path. 41 PATH=${PREFIX}/bin:/bin:/usr/bin 33 PATH=${PREFIX}/bin:/bin:/usr/bin:/opt/local/bin 42 34 # Log for the e-mail in case of failure. 43 35 FAILURE_LOG=${ROOT}/failure.log … … 56 48 fi 57 49 58 # Create the SSH wrapper if it doesn't exist (comment this for -d /Volumes...)59 if [ ! -e $SSH_KEY ]; then60 echo "Key doesn't exist. The script is configured to find the SSH key at:"61 echo "${SSH_KEY}"62 exit 163 fi64 65 # Create the SSH wrapper if it doesn't exist (comment this for -d /Volumes...)66 if [ ! -x $SSH_WRAPPER ]; then67 echo "#!/bin/bash" > $SSH_WRAPPER && \68 echo "/usr/bin/ssh -i ${SSH_KEY} \$*" >> $SSH_WRAPPER && \69 chmod +x $SSH_WRAPPER \70 || { echo "Creation of wrapper failed" ; exit 1 ; }71 fi72 73 50 # checkout if required, update otherwise. 74 51 if [ ! -d ${TREE} ]; then 75 mkdir -p ${TREE} && \ 52 { echo "SVN update failed, please check out a copy of DP into ${TREE}" >> $FAILURE_LOG ; FAILED=1 ; } 53 else 76 54 cd ${TREE} && \ 77 CVS_RSH=${SSH_WRAPPER} cvs -q -d $CVS_ROOT co darwinports > $FAILURE_LOG 2>&1 \ 78 || { echo "CVS checkout failed" >> $FAILURE_LOG ; FAILED=1 ; } 79 else 80 cd ${TREE}/${CVS_MODULE} && \ 81 CVS_RSH=${SSH_WRAPPER} cvs -q update -dP > $FAILURE_LOG 2>&1 \ 82 || { echo "CVS update failed" >> $FAILURE_LOG ; FAILED=1 ; } 55 svn -q --non-interactive --config-dir $SVN_CONFIG_DIR update > $FAILURE_LOG 2>&1 \ 56 || { echo "SVN update failed" >> $FAILURE_LOG ; FAILED=1 ; } 83 57 fi 84 58 85 59 # (re)configure. 86 60 if [ $FAILED -eq 0 ]; then 87 cd ${TREE}/ ${CVS_MODULE}/base/ && \61 cd ${TREE}/base/ && \ 88 62 mkdir -p ${TCLPKG} && \ 89 63 ./configure \ … … 98 72 # (cleaning is useful because we don't want the indexing to fail because dependencies aren't properly computed). 99 73 if [ $FAILED -eq 0 ]; then 100 { cd ${TREE}/ ${CVS_MODULE}/base/ && \74 { cd ${TREE}/base/ && \ 101 75 make clean > $FAILURE_LOG 2>&1 ; } \ 102 76 || { echo "make clean failed" >> $FAILURE_LOG ; FAILED=1 ; } … … 105 79 # (re)build 106 80 if [ $FAILED -eq 0 ]; then 107 { cd ${TREE}/ ${CVS_MODULE}/base/ && \81 { cd ${TREE}/base/ && \ 108 82 make > $FAILURE_LOG 2>&1 ; } \ 109 83 || { echo "make failed" >> $FAILURE_LOG ; FAILED=1 ; } … … 112 86 # (re)install 113 87 if [ $FAILED -eq 0 ]; then 114 { cd ${TREE}/ ${CVS_MODULE}/base/ && \88 { cd ${TREE}/base/ && \ 115 89 make install > $FAILURE_LOG 2>&1 ; } \ 116 90 || { echo "make install failed" >> $FAILURE_LOG ; FAILED=1 ; } … … 119 93 # (re)index 120 94 if [ $FAILED -eq 0 ]; then 121 { cd ${TREE}/ ${CVS_MODULE}/dports/ && \95 { cd ${TREE}/dports/ && \ 122 96 ${PREFIX}/bin/portindex > $FAILURE_LOG 2>&1 ; } \ 123 97 || { echo "portindex failed" >> $FAILURE_LOG ; FAILED=1 ; } … … 136 110 137 111 # Actually commit the file. 138 { cd ${TREE}/ ${CVS_MODULE}/dports/ && \139 CVS_RSH=${SSH_WRAPPER} cvscommit -F $COMMIT_MSG PortIndex > $FAILURE_LOG 2>&1 ; } \140 || { echo " cvscommit failed" >> $FAILURE_LOG ; FAILED=1 ; }112 { cd ${TREE}/dports/ && \ 113 svn --config-dir $SVN_CONFIG_DIR commit -F $COMMIT_MSG PortIndex > $FAILURE_LOG 2>&1 ; } \ 114 || { echo "SVN commit failed" >> $FAILURE_LOG ; FAILED=1 ; } 141 115 fi 142 116
Note: See TracChangeset
for help on using the changeset viewer.