aboutsummaryrefslogtreecommitdiffstats
path: root/remove_info_dir
diff options
context:
space:
mode:
Diffstat (limited to 'remove_info_dir')
-rwxr-xr-xremove_info_dir12
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"