Changeset 920 for branches


Ignore:
Timestamp:
Nov 4, 2006, 12:38:25 AM (13 years ago)
Author:
bruno
Message:

Now uses rpmquery for macro expansion in rpm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/tools/distro-env

    r918 r920  
    121121
    122122# Default
    123 export TOPBUILDDIR=`rpm --showrc | grep -E '[   ]_topdir[   ]' | awk '{print $3}'`
     123export TOPBUILDDIR=${TOPDIR}/../build
    124124
    125125if [ _"$dtype" = _"rpm" ]; then
     126    export TOPBUILDDIR=`rpmquery -E '%{_topdir}' 2> /dev/null`
    126127    export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'`
    127     if [ -f ${HOME}/.rpmmacros ]; then
    128         _TOPBUILDDIR=`egrep '^%_topdir' ${HOME}/.rpmmacros | awk '{print $2}'`
    129         if [ _"$_TOPBUILDDIR" != _"" ]; then
    130             export TOPBUILDDIR=$_TOPBUILDDIR
    131         fi
    132     fi
    133128    mkdir -p ${TOPBUILDDIR}/{RPMS,SRPMS,SPECS,SOURCES,BUILD}
    134129    if [ $? -ne 0 ]; then
Note: See TracChangeset for help on using the changeset viewer.