use rpm --eval to get rpm source dir

git-svn-id: trunk@9085 -
This commit is contained in:
vincents 2006-04-05 20:23:07 +00:00
parent d5ed36ac02
commit e0bfbe601f

View File

@ -1,10 +1,6 @@
#!/usr/bin/env bash
if [ -f ~/.rpmmacros ]; then
RPMDir=$(cat ~/.rpmmacros | egrep '^%_topdir ' | sed -e 's#^%_topdir ##')
else
RPMDir=/usr/src/redhat
fi
RPMDir=`rpm --eval "%{_topdir}"`
echo $RPMDir