summaryrefslogtreecommitdiff
path: root/brp-remove-info-dir
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-29 06:33:38 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-29 06:33:38 +0000
commit6be8483f86d6af135c5f41298b5ade0ba93e8f93 (patch)
tree79cf12161389b3bc8b2d3d253166f175ea31fa55 /brp-remove-info-dir
parent1175fc575d157169d8592e937cba42181d0ec3f2 (diff)
automatic import of openEuler-rpm-config
Diffstat (limited to 'brp-remove-info-dir')
-rw-r--r--brp-remove-info-dir19
1 files changed, 19 insertions, 0 deletions
diff --git a/brp-remove-info-dir b/brp-remove-info-dir
new file mode 100644
index 0000000..5961830
--- /dev/null
+++ b/brp-remove-info-dir
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ -z "$RPM_BUILD_ROOT" ]; then
+ echo "No build root defined" >&2
+ exit 1
+fi
+
+if [ ! -d "$RPM_BUILD_ROOT" ]; then
+ echo "Invalid build root" >&2
+ exit 1
+fi
+
+INFODIR=`rpm --eval %{_infodir}/dir`
+
+dir="$RPM_BUILD_ROOT/$INFODIR"
+
+if [ -f $dir -a ! -L $dir ]; then
+ rm -f $dir
+fi