summaryrefslogtreecommitdiff
path: root/app/xterm/df-install.in
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2013-01-04 16:40:19 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2013-01-04 16:40:19 +0000
commit4a64ee085cebf685431fe2c5af7060c5e5a78eaf (patch)
treece110d86f51f6bd5770727702c68a183da520a28 /app/xterm/df-install.in
parentd74c4945d1b4b45a68384735fc45585735cb36c0 (diff)
Update to xterm 287. tested by mpi@ and krw@.
Diffstat (limited to 'app/xterm/df-install.in')
-rw-r--r--app/xterm/df-install.in19
1 files changed, 16 insertions, 3 deletions
diff --git a/app/xterm/df-install.in b/app/xterm/df-install.in
index acef3c769..91d615803 100644
--- a/app/xterm/df-install.in
+++ b/app/xterm/df-install.in
@@ -1,9 +1,9 @@
#!/bin/sh
-# $XTermId: df-install.in,v 1.5 2011/07/07 09:41:14 tom Exp $
+# $XTermId: df-install.in,v 1.14 2012/08/27 01:07:19 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2011 by Thomas E. Dickey
+# Copyright 2011,2012 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -79,12 +79,25 @@ then
exit 1
fi
+# The newer dfi whines about deprecation of encoding, but no release provides
+# --version or equivalent. really.
+if desktop-file-install --help-all >/dev/null 2>&1
+then
+ NO_ENCODING="#Encoding"
+else
+ NO_ENCODING="Encoding"
+fi
+
NEW_FILE=`basename $OLD_FILE`
sed \
+ -e '/^Encoding=/s%Encoding%'$NO_ENCODING'%' \
+ -e '/^[^#]*Icon=/s%=.*%=xterm-color%' \
+ -e '/^[^#]*Category=/s%=.*%=@DESKTOP_CATEGORY@%' \
+ -e '/^[^#]*Categories=/s%=.*%=@DESKTOP_CATEGORY@%' \
-e '/^[^#]/s%xterm%'$APP_NAME'%g' \
-e '/^[^#]/s%XTerm%@APP_CLASS@%g' \
- -e '/^Category=/s%=.*%@DESKTOP_CATEGORY@%' \
$OLD_FILE >$MY_TEMP/$NEW_FILE
+diff -u $OLD_FILE $MY_TEMP/$NEW_FILE
cd $MY_TEMP
desktop-file-install $OPTS $NEW_FILE