Skip to content

Commit 15c1ee1

Browse files
authored
Merge pull request #2624 from jsquyres/pr/one-more-buildrpm-fix
buildrpm.sh: don't use $HOME
2 parents 24000aa + 6002a8b commit 15c1ee1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contrib/dist/linux/buildrpm.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,11 @@ fi
267267
# Find where the top RPM-building directory is
268268
#
269269

270-
rpmtopdir=${rpmtopdir:-"`grep %_topdir $HOME/.rpmmacros | awk '{ print $2 }'`"}
270+
rpmtopdir=
271+
file=~/.rpmmacros
272+
if test -r $file; then
273+
rpmtopdir=${rpmtopdir:-"`grep %_topdir $file | awk '{ print $2 }'`"}
274+
fi
271275
if test "$rpmtopdir" != ""; then
272276
rpmbuild_options="$rpmbuild_options --define '_topdir $rpmtopdir'"
273277
if test ! -d "$rpmtopdir"; then

0 commit comments

Comments
 (0)