aboutsummaryrefslogtreecommitdiffstats
path: root/remove_info_dir
blob: a79cd4aaa766bffcad5d1bacf7b3ef89eebc96a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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