blob: 1831c5cc992fb55fcd3bb4218bebff527f5a8f66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
#
# A fixed version of this file that doesn't bomb out
# when failing to match. Also removed the case statement
# as it's simpler to just let 'find' do everything in one pass.
#
#
# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
exit 0
fi
#
# Remove occurences of $RPM_BUILD_ROOT from *.la and *.pc files.
#
for f in `find $RPM_BUILD_ROOT -type f -name \*.pc -o -name \*.la` ; do
# -c to count the occurances, only proceed if >= 1
if [ `grep -c "${RPM_BUILD_ROOT}\/" "$f"` -ge 1 ]; then
sed -e "s|${RPM_BUILD_ROOT}/|/|g" "$f" > "$f.out"
mv -f "$f.out" "$f"
fi
done
|