cope with with data file names that contain spaces
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user