Changeset 1043 in MondoRescue for trunk/tools/distro-env


Ignore:
Timestamp:
Jan 8, 2007, 11:31:22 PM (14 years ago)
Author:
Bruno Cornec
Message:

merge -r978:1042 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/distro-env

    r932 r1043  
    3939            export ddir="sles"
    4040            export dver=`head -1 /etc/SuSE-release | awk '{print $5}'`
     41        elif grep -q openSUSE /etc/SuSE-release ; then
     42            export ddir="suse"
     43            export dver=`head -1 /etc/SuSE-release | awk '{print $2}'`
    4144        else
    4245            export ddir="suse"
    4346            export dver=`head -1 /etc/SuSE-release | awk '{print $3}'`
    4447        fi
     48    elif [ -e /etc/slackware-version ]; then
     49        export ddir="slackware"
     50        export dver=`awk '{print $2}' /etc/slackware-version | cut -d. -f1-2`
    4551    elif [ -e /etc/gentoo-release ]; then
    4652        export ddir="gentoo"
     
    5763        if [ $dver = "testing/unstable" ]; then
    5864            export dver = "sid"
     65        fi
     66    elif [ -e /etc/motd ]; then
     67        head -1 /etc/motd | grep -q FreeBSD
     68        if [ $? -eq 0 ]; then
     69            export ddir="freebsd"
     70            export dver=`head -1 /etc/motd | awk '{print $2}' /etc/motd | cut -d- -f1`
     71        else
     72            export ddir="unknown"
     73            export dver=""
    5974        fi
    6075    else
     
    7792    suf=".${ddir}${dver1}"
    7893elif [ $ddir = "slackware" ]; then
    79     dfam="slack"
     94    dfam="slackware"
    8095    dtype="tgz"
    8196    suf=".${dfam}${dver}"
     
    106121    dtype="rpm"
    107122    suf=".`echo $dver | sed 's/\.//'`mdv"
     123elif [ $ddir = "freebsd" ]; then
     124    dfam="freebsd"
     125    dtype="port"
     126    suf=".`echo $dver | sed 's/\.//'`fbsd"
    108127else
    109128    dfam="unknown"
     
    124143
    125144if [ _"$dtype" = _"rpm" ]; then
    126     export TOPBUILDDIR=`rpmquery -E '%{_topdir}' 2> /dev/null`
     145    export TOPBUILDDIR=`rpmquery --eval '%{_topdir}' 2> /dev/null`
    127146    export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'`
    128147    mkdir -p ${TOPBUILDDIR}/{RPMS,SRPMS,SPECS,SOURCES,BUILD}
     
    135154elif [ _"$dtype" = _"deb" ]; then
    136155    mkdir -p ${TOPBUILDDIR}
     156elif [ _"$dtype" = _"port" ]; then
     157    mkdir -p ${TOPBUILDDIR}
     158elif [ _"$dfam" = _"slackware" ]; then
     159    mkdir -p ${TOPBUILDDIR}/install
    137160elif [ _"$dtype" = _"ebuild" ]; then
    138161    mkdir -p ${TOPBUILDDIR}/portage
Note: See TracChangeset for help on using the changeset viewer.