Changeset 684 for trunk/technical


Ignore:
Timestamp:
Aug 14, 2004, 3:57:44 PM (20 years ago)
Author:
joergs
Message:

only modify %changelog section in spec file, if this section doesn't already exists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/technical/common/build/build.sh

    r683 r684  
    3333
    3434[ -z "$BUILD_MODE" ] && BUILD_MODE="--verify"
    35 [ -z "$BUILD_DIST" ] && BUILD_DIST="sles8-i386+update"
     35[ -z "$BUILD_DIST" ] && BUILD_DIST="9.1-i386"
    3636[ -z "$BUILD_ROOT" ] && BUILD_ROOT="/var/tmp/buildsystem.$USER.$BUILD_DIST"
    3737[ -z "$BUILD_PREPARE_SPEC" ] && BUILD_PREPARE_SPEC="no"
     
    123123                svn log -v . > ChangeLog.new && mv ChangeLog.new ChangeLog
    124124                cat ChangeLog >> Changes
    125                 cat Changes >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     125               
     126                # if there is no changelog section in the spec file,
     127                # also append the Changes there
     128                if ! grep -q "%changelog" $SPECFILE ; then
     129                        # paste "Changes" into SPEC file.
     130                        echo "%changelog" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     131                        # without trailing *, except for the initial
     132                        echo -n "*" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     133                        cat Changes | sed 's/\(^[\*]\+\)//g' >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     134                fi
    126135        fi
    127136        # just make sure, that the Changes file exist
Note: See TracChangeset for help on using the changeset viewer.