diff options
author | CoprDistGit <infra@openeuler.org> | 2024-09-18 07:06:26 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-09-18 07:06:26 +0000 |
commit | d68770f6939ab160ff27ec4e65ccc88cd3677bd0 (patch) | |
tree | 5fc00dcf6a9f1ac8a974f9d3b42e07001796a3b6 /brp-remove-info-dir | |
parent | c22cb56acddf5bc4147f60908d5ebd770a079070 (diff) |
automatic import of openEuler-rpm-config
Diffstat (limited to 'brp-remove-info-dir')
-rw-r--r-- | brp-remove-info-dir | 19 |
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 |