Changeset 14477 for trunk/base


Ignore:
Timestamp:
Oct 8, 2005, 7:54:40 AM (15 years ago)
Author:
pguyot (Paul Guyot)
Message:

Commit IndexRegen as it is now executed twice a day on lamancha.

  • Configuration changed
  • Made the script more robust
  • Fixed a bug with -with-tcl-package -> -with-tclpackage
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/portmgr/IndexRegen.sh

    r14472 r14477  
    66# e-mail: jmpp@opendarwin.org
    77# Updated by Paul Guyot, <pguyot@kallisys.net>
    8 # Date: 2005/10/4
     8# $Id: IndexRegen.sh,v 1.5 2005/10/08 07:54:40 pguyot Exp $
    99####
    1010
    1111# Configuration
    1212# ROOT directory, where everything is. This must exist.
    13 ROOT=/Users/paul/darwinports-portindex
     13ROOT=/Users/pguyot/dp-portindex
    1414# SSH key. This must exist.
    1515SSH_KEY=${ROOT}/id_dsa
    1616# DP user.
    17 DP_USER=paul
     17DP_USER=pguyot
    1818# DP group.
    19 DP_GROUP=admin
     19DP_GROUP=darwinports
    2020# CVS user.
    2121CVS_USER=pguyot
     
    4343# Something went wrong.
    4444FAILED=0
    45 # Output of portindex.
    46 PORTINDEX_LOG=${ROOT}/portindex.log
    4745# Commit message.
    4846COMMIT_MSG=${ROOT}/commit.msg
     
    8381        ./configure \
    8482                --prefix=${PREFIX} \
    85                 --with-tcl-package=${TCLPKG} \
     83                --with-tclpackage=${TCLPKG} \
    8684                --with-install-user=${DP_USER} \
    8785                --with-install-group=${DP_GROUP} > $FAILURE_LOG 2>&1 \
    8886                || { echo "./configure failed" >> $FAILURE_LOG ; FAILED=1 ; }
     87fi
     88
     89# clean
     90# (cleaning is useful because we don't want the indexing to fail because dependencies aren't properly computed).
     91if [ $FAILED -eq 0 ]; then
     92        { cd ${TREE}/${CVS_MODULE}/base/ && \
     93        make clean > $FAILURE_LOG 2>&1 ; } \
     94                || { echo "make clean failed" >> $FAILURE_LOG ; FAILED=1 ; }
    8995fi
    9096
     
    106112if [ $FAILED -eq 0 ]; then
    107113        { cd ${TREE}/${CVS_MODULE}/dports/ && \
    108         ${PREFIX}/bin/portindex | tee $PORTINDEX_LOG > $FAILURE_LOG 2>&1 ; } \
     114        ${PREFIX}/bin/portindex > $FAILURE_LOG 2>&1 ; } \
    109115                || { echo "portindex failed" >> $FAILURE_LOG ; FAILED=1 ; }
    110116fi
     
    119125if [ $FAILED -eq 0 ]; then
    120126        # Use the last 5 lines of the log for the commit message.
    121         tail -n 5 $PORTINDEX_LOG > $COMMIT_MSG
     127        tail -n 5 $FAILURE_LOG > $COMMIT_MSG
    122128       
    123129        # Actually commit the file.
     
    132138else
    133139        # trash log files
    134         rm -f $PORTINDEX_LOG $COMMIT_MSG $FAILURE_LOG
     140        rm -f $COMMIT_MSG $FAILURE_LOG
    135141fi
    136142
Note: See TracChangeset for help on using the changeset viewer.