diff options
author | Guillaume Rousse <guillomovitch@mandriva.org> | 2009-05-23 12:39:39 +0000 |
---|---|---|
committer | Guillaume Rousse <guillomovitch@mandriva.org> | 2009-05-23 12:39:39 +0000 |
commit | 47ffee16484c175cffc2b1cf445334be12ac5bd3 (patch) | |
tree | 4bfc32557a313a7889ae5f44ca455afd02c4c555 /remove_info_dir | |
parent | 0af7318080a8601ed20a6ae2f7725a2be2d4f934 (diff) | |
download | spec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.tar spec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.tar.gz spec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.tar.bz2 spec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.tar.xz spec-helper-47ffee16484c175cffc2b1cf445334be12ac5bd3.zip |
check buildroot as other scripts
Diffstat (limited to 'remove_info_dir')
-rwxr-xr-x | remove_info_dir | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/remove_info_dir b/remove_info_dir index aa1e152..a79cd4a 100755 --- a/remove_info_dir +++ b/remove_info_dir @@ -1,8 +1,16 @@ #!/bin/sh -INFODIR=`rpm --eval %{_infodir}/dir` +if [ -z "$RPM_BUILD_ROOT" ]; then + echo "No build root defined" >&2 + exit 1 +fi -test -n "$RPM_BUILD_ROOT" || exit 0 +if [ ! -d "$RPM_BUILD_ROOT" ]; then + echo "Invalid build root" >&2 + exit 1 +fi + +INFODIR=`rpm --eval %{_infodir}/dir` dir="$RPM_BUILD_ROOT/$INFODIR" |