Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
update-desktop-files
brp-trim-desktop.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File brp-trim-desktop.sh of Package update-desktop-files
#! /bin/sh # macro: suse_update_desktop_file # # Used to add easily a category to .desktop files according to XDG # standard. # # # find file # BASEDIR=`dirname $RPM_SOURCE_DIR`/OTHER if ! test -f /.buildenv; then # this looks fishy, skip it echo "WARNING: I better not trim without a /.buildenv around" exit 0 fi if ! test -w $BASEDIR; then echo "WARNING: Can't write to $BASEDIR, skipping" exit 0 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 if grep -q ^X-SuSE-translate= "$FILE"; then echo "DEBUG: $FILE contains X-SuSE-translate - skipping" >&2 continue fi # save for backup NFILE=${FILE#$RPM_BUILD_ROOT} echo "<<$NFILE>>" >> $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" # # 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 done
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor