Accepting request 242263 from X11:common:Factory
1 OBS-URL: https://build.opensuse.org/request/show/242263 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/update-desktop-files?expand=0&rev=91
This commit is contained in:
commit
2fd0c8fcaa
@ -23,7 +23,7 @@ if ! test -w $BASEDIR; then
|
||||
fi
|
||||
|
||||
find /$RPM_BUILD_ROOT/usr/share /$RPM_BUILD_ROOT/etc/xdg/autostart/ \
|
||||
-name *.desktop -o -name .directory 2>/dev/null | while read FILE; do
|
||||
-type -f \( -name '*.desktop' -o -name .directory \) 2>/dev/null | while read -r FILE; do
|
||||
|
||||
if grep -q ^X-SuSE-translate= "$FILE"; then
|
||||
echo "DEBUG: $FILE contains X-SuSE-translate - skipping" >&2
|
||||
@ -31,9 +31,9 @@ find /$RPM_BUILD_ROOT/usr/share /$RPM_BUILD_ROOT/etc/xdg/autostart/ \
|
||||
fi
|
||||
|
||||
# save for backup
|
||||
NFILE=${FILE#$RPM_BUILD_ROOT}
|
||||
NFILE="${FILE#$RPM_BUILD_ROOT}"
|
||||
echo "<<$NFILE>>" >> $BASEDIR/$RPM_PACKAGE_NAME.desktopfiles
|
||||
cat $FILE >> $BASEDIR/$RPM_PACKAGE_NAME.desktopfiles
|
||||
cat "$FILE" >> $BASEDIR/$RPM_PACKAGE_NAME.desktopfiles
|
||||
# make sure we end with a newline
|
||||
echo >> $BASEDIR/$RPM_PACKAGE_NAME.desktopfiles
|
||||
echo "trimmed output to $BASEDIR/$RPM_PACKAGE_NAME.desktopfiles"
|
||||
@ -41,10 +41,7 @@ find /$RPM_BUILD_ROOT/usr/share /$RPM_BUILD_ROOT/etc/xdg/autostart/ \
|
||||
#
|
||||
# Trim translations (desktops will use gettext to find them)
|
||||
#
|
||||
grep -v -E '^Name\[|^GenericName\[|^Comment\[' $FILE > ${FILE}_
|
||||
sed -i -e '/^\[Desktop Entry\]/a \
|
||||
X-SuSE-translate=true' ${FILE}_
|
||||
mv ${FILE}_ $FILE
|
||||
|
||||
sed -e '/^\(Name\[\|GenericName\[\|Comment\[\)/d' -e '/^\[Desktop Entry\]/a \
|
||||
X-SuSE-translate=true' "$FILE" > "${FILE}_" && mv "${FILE}_" "$FILE"
|
||||
done
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 24 11:59:42 UTC 2014 - gber@opensuse.org
|
||||
|
||||
- handle symlinks, fix quoting problems and unnecessary use of grep
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 1 09:49:21 UTC 2014 - coolo@suse.com
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user