cope with with data file names that contain spaces

This commit is contained in:
Matthias Mailänder
2013-09-14 21:04:22 +02:00
parent c880e47add
commit b9c226bc18

View File

@@ -13,7 +13,27 @@ sed -i "s/{VERSION_FIELD}/$PKGVERSION/" openra.spec
rootdir=`readlink -f $2`
sed -i "s|{ROOT_DIR}|$rootdir|" openra.spec
for x in `find $rootdir -type f`
# List files to avoid owning standard dirs.
for x in `find $rootdir/usr/bin -type f`
do
y="${x#$rootdir}"
sed -i "/%files/ a ${y}" openra.spec
done
for x in `find $rootdir/usr/share/icons -type f`
do
y="${x#$rootdir}"
sed -i "/%files/ a ${y}" openra.spec
done
for x in `find $rootdir/usr/share/applications -type f`
do
y="${x#$rootdir}"
sed -i "/%files/ a ${y}" openra.spec
done
# List directories only to avoid spam and problems with files containing spaces.
for x in `find $rootdir/usr/share/openra -type d`
do
y="${x#$rootdir}"
sed -i "/%files/ a ${y}" openra.spec