Changeset 1043 in MondoRescue for trunk/tools/distro-env
- Timestamp:
- Jan 8, 2007, 11:31:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/distro-env
r932 r1043 39 39 export ddir="sles" 40 40 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}'` 41 44 else 42 45 export ddir="suse" 43 46 export dver=`head -1 /etc/SuSE-release | awk '{print $3}'` 44 47 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` 45 51 elif [ -e /etc/gentoo-release ]; then 46 52 export ddir="gentoo" … … 57 63 if [ $dver = "testing/unstable" ]; then 58 64 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="" 59 74 fi 60 75 else … … 77 92 suf=".${ddir}${dver1}" 78 93 elif [ $ddir = "slackware" ]; then 79 dfam="slack "94 dfam="slackware" 80 95 dtype="tgz" 81 96 suf=".${dfam}${dver}" … … 106 121 dtype="rpm" 107 122 suf=".`echo $dver | sed 's/\.//'`mdv" 123 elif [ $ddir = "freebsd" ]; then 124 dfam="freebsd" 125 dtype="port" 126 suf=".`echo $dver | sed 's/\.//'`fbsd" 108 127 else 109 128 dfam="unknown" … … 124 143 125 144 if [ _"$dtype" = _"rpm" ]; then 126 export TOPBUILDDIR=`rpmquery - E'%{_topdir}' 2> /dev/null`145 export TOPBUILDDIR=`rpmquery --eval '%{_topdir}' 2> /dev/null` 127 146 export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'` 128 147 mkdir -p ${TOPBUILDDIR}/{RPMS,SRPMS,SPECS,SOURCES,BUILD} … … 135 154 elif [ _"$dtype" = _"deb" ]; then 136 155 mkdir -p ${TOPBUILDDIR} 156 elif [ _"$dtype" = _"port" ]; then 157 mkdir -p ${TOPBUILDDIR} 158 elif [ _"$dfam" = _"slackware" ]; then 159 mkdir -p ${TOPBUILDDIR}/install 137 160 elif [ _"$dtype" = _"ebuild" ]; then 138 161 mkdir -p ${TOPBUILDDIR}/portage
Note:
See TracChangeset
for help on using the changeset viewer.