Changeset 932 in MondoRescue for trunk/tools/distro-env
- Timestamp:
- Nov 15, 2006, 12:40:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/distro-env
r900 r932 27 27 export ddir="fedora" 28 28 export dver=`awk '{print $4}' /etc/redhat-release` 29 elif grep -q CentOS /etc/redhat-release ; then 30 export ddir="centos" 31 export dver=`awk '{print $3}' /etc/redhat-release` 29 32 else 30 33 export ddir="redhat" … … 81 84 dtype="rpm" 82 85 suf=".${ddir}${dver}" 83 elif [ $ddir = "fedora" -o $ddir = "redhat" -o $ddir = "rhel" ]; then86 elif [ $ddir = "fedora" -o $ddir = "redhat" -o $ddir = "rhel" -o $ddir = "centos" ]; then 84 87 dfam="redhat" 85 88 dtype="rpm" … … 87 90 if [ $ddir = "fedora" ]; then 88 91 suf=".fc${dver1}" 92 elif [ $ddir = "centos" ]; then 93 dver1=`echo ${dver} | sed "s/\.[0-9]//"` 94 suf=".centos${dver1}" 89 95 elif [ $ddir = "redhat" ]; then 90 96 suf=".rh${dver1}" … … 118 124 119 125 if [ _"$dtype" = _"rpm" ]; then 126 export TOPBUILDDIR=`rpmquery -E '%{_topdir}' 2> /dev/null` 120 127 export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'` 121 if [ -f ${HOME}/.rpmmacros ]; then 122 export TOPBUILDDIR=`egrep '^%_topdir' ${HOME}/.rpmmacros | awk '{print $2}'` 128 mkdir -p ${TOPBUILDDIR}/{RPMS,SRPMS,SPECS,SOURCES,BUILD} 129 if [ $? -ne 0 ]; then 130 echo "Please ensure that you can write into ${TOPBUILDDIR}" 131 echo "Solution: setup _topdir in your ~/.rpmmacros or" 132 echo "chown the ${TOPBUILDDIR} to your uid" 133 exit -1 123 134 fi 124 mkdir -p ${TOPBUILDDIR}/{RPMS,SRPMS,SPECS,SOURCES,BUILD}125 135 elif [ _"$dtype" = _"deb" ]; then 126 136 mkdir -p ${TOPBUILDDIR}
Note:
See TracChangeset
for help on using the changeset viewer.