]> git.pld-linux.org Git - packages/imsettings.git/blame - imsettings-no-bash.patch
- updated to 1.2.8
[packages/imsettings.git] / imsettings-no-bash.patch
CommitLineData
857bdfe0
JB
1--- imsettings-1.2.8/data/xinput.sh.in.in.orig 2012-02-17 21:15:19.743090124 +0100
2+++ imsettings-1.2.8/data/xinput.sh.in.in 2012-02-18 07:28:16.724321553 +0100
8c5db2e1
JR
3@@ -1,4 +1,4 @@
4-#!/bin/bash
5+#!/bin/sh
501f6d48 6 # Copyright (C) 1999-2004,2007-2011 Red Hat, Inc. All rights reserved. This
8c5db2e1
JR
7 # copyrighted material is made available to anyone wishing to use, modify,
8 # copy, or redistribute it subject to the terms and conditions of the
9@@ -10,27 +10,27 @@
10 #
11 # X Input method setup script
12
13-function log_init() {
14+log_init() {
15 if [ ! -n "$DRY_RUN" ]; then
16 rm -rf $HOME/.imsettings.log
17 touch $HOME/.imsettings.log
18 fi
19 }
20
21-function log() {
22+log() {
23 echo "$@" >> $HOME/.imsettings.log
24 }
25
26-function is_dbus_enabled() {
27+is_dbus_enabled() {
28 imsettings-check --check-dbus
29 [ $? -eq 0 ]
30 }
31
32-function is_imsettings_enabled() {
33+is_imsettings_enabled() {
34 [ -z "$DISABLE_IMSETTINGS" ] && is_dbus_enabled
35 }
36
37-function check_imsettings_capability() {
38+check_imsettings_capability() {
39 mod=$1
40 imsettings-check --check-modules >/dev/null
41 ret=$?
42@@ -41,7 +41,7 @@
43 return $ret
44 }
45
501f6d48
JB
46-function lookup_desktop() {
47+lookup_desktop() {
48 ret=$(cat $1)
49 case $ret in
50 gnome*)
51@@ -62,7 +62,7 @@
52 esac
53 }
54
55-function get_desktop() {
56+get_desktop() {
57 if [ -n "$GDMSESSION" ]; then
58 GUESS_DESKTOP="\$GDMSESSION"
59 echo "$GDMSESSION"
60@@ -89,7 +89,7 @@
61 fi
62 }
63
8c5db2e1
JR
64-function is_gtk_supported() {
65+is_gtk_supported() {
66 [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
501f6d48 67 case "$(get_desktop|tr '[A-Z]' '[a-z]')" in
8c5db2e1 68 *gnome|openbox)
501f6d48 69@@ -114,7 +114,7 @@
8c5db2e1
JR
70 return 1
71 }
72
73-function is_qt_supported() {
74+is_qt_supported() {
75 [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
501f6d48 76 case "$(get_desktop|tr '[A-Z]' '[a-z]')" in
8c5db2e1 77 *)
501f6d48 78@@ -127,7 +127,7 @@
8c5db2e1
JR
79 return 1
80 }
81
82-function is_xim_supported() {
83+is_xim_supported() {
84 [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
85 if check_imsettings_capability xim; then
86 return 0
501f6d48 87@@ -136,7 +136,7 @@
8c5db2e1
JR
88 return 1
89 }
90
91-function setup_gtk_immodule() {
92+setup_gtk_immodule() {
93 if is_imsettings_enabled && is_gtk_supported; then
94 # Ensure GTK_IM_MODULE is empty. otherwise GTK+ doesn't pick up immodule through XSETTINGS
95 unset GTK_IM_MODULE
501f6d48 96@@ -146,7 +146,7 @@
8c5db2e1
JR
97 fi
98 }
99
100-function setup_qt_immodule() {
101+setup_qt_immodule() {
102 if is_imsettings_enabled && is_qt_supported; then
103 # FIXME: Qt doesn't support XSETTINGS for immodule yet.
104 # We still need to go with the older way.
501f6d48 105@@ -156,7 +156,7 @@
8c5db2e1
JR
106 fi
107 }
108
109-function setup_xim() {
110+setup_xim() {
111 if is_imsettings_enabled && is_xim_supported; then
112 # setup XMODIFIERS
113 XMODIFIERS="@im=imsettings"
501f6d48 114@@ -167,7 +167,7 @@
8c5db2e1
JR
115 fi
116 }
117
118-function run_imsettings() {
119+run_imsettings() {
120 print_info
121 if [ -n "$DRY_RUN" ]; then
122 log "*** DRY RUN MODE: running IM through imsettings"
501f6d48 123@@ -182,7 +182,7 @@
8c5db2e1
JR
124 fi
125 }
126
127-function run_xim() {
128+run_xim() {
129 print_info
130 if [ -n "$DRY_RUN" ]; then
131 log "*** DRY RUN MODE: running IM without imsettings"
501f6d48 132@@ -195,7 +195,7 @@
8c5db2e1
JR
133 fi
134 }
135
136-function print_result() {
137+print_result() {
138 $1
139 if [ $? -eq 0 ]; then
140 log yes
501f6d48 141@@ -204,7 +204,7 @@
8c5db2e1
JR
142 fi
143 }
144
145-function print_info() {
146+print_info() {
147 log "imsettings information"
148 log "=========================="
857bdfe0
JB
149 log "XINPUTRC: $READ_XINPUTRC"
150@@ -242,13 +242,13 @@
8c5db2e1
JR
151 unset TERM
152 if [ -r /etc/profile.d/lang.sh ]; then
153 # for Fedora etc
154- source /etc/profile.d/lang.sh
155+ . /etc/profile.d/lang.sh
156 elif [ -r /etc/default/locale ]; then
157 # for Debian
158- source /etc/default/locale
159+ . /etc/default/locale
160 elif [ -r /etc/env.d/02locale ]; then
161 # for Gentoo
162- source /etc/env.d/02locale
163+ . /etc/env.d/02locale
164 fi
165 [ -n "$oldterm" ] && export TERM=$oldterm
166
857bdfe0 167@@ -260,7 +260,7 @@
8c5db2e1
JR
168 [ -z "$IMSETTINGS_DISABLE_USER_XINPUTRC" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no
169
170 if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then
171- source "$USER_XINPUTRC"
172+ . "$USER_XINPUTRC"
857bdfe0 173 READ_XINPUTRC=$USER_XINPUTRC
8c5db2e1
JR
174 if [ ! -h "$USER_XINPUTRC" ]; then
175 SHORT_DESC="User Specific"
857bdfe0 176@@ -272,7 +272,7 @@
8c5db2e1
JR
177 _sourced_xinputrc=0
178 for i in $_im_language_list; do
179 if echo $tmplang | grep -q -E "^$i"; then
180- source "$SYS_XINPUTRC"
181+ . "$SYS_XINPUTRC"
857bdfe0 182 READ_XINPUTRC=$SYS_XINPUTRC
8c5db2e1
JR
183 _sourced_xinputrc=1
184 break
857bdfe0 185@@ -284,7 +284,7 @@
8c5db2e1
JR
186 _xcompose_language_list="am_ET el_GR fi_FI pt_BR ru_RU"
187 for i in $_xcompose_language_list; do
188 if echo $tmplang | grep -q -E "^$i"; then
189- source @XINPUT_PATH@/xcompose.conf
190+ . @XINPUT_PATH@/xcompose.conf
191 _sourced_xinputrc=1
192 break
193 fi
857bdfe0 194@@ -292,7 +292,7 @@
8c5db2e1
JR
195 fi
196 if [ $_sourced_xinputrc -eq 0 ]; then
197 # Read none.conf to set up properly for locales not listed the above.
198- source @XINPUT_PATH@/none.conf
199+ . @XINPUT_PATH@/none.conf
200 fi
201 fi
202
203--- imsettings-1.2.4/data/xinputinfo.sh.in.orig 2011-03-08 07:39:32.000000000 +0100
204+++ imsettings-1.2.4/data/xinputinfo.sh.in 2011-07-17 22:57:52.000000000 +0200
205@@ -1,4 +1,4 @@
206-#!/bin/bash
207+#!/bin/sh
208 # xinputinfo.sh
209 # Copyright (C) 2008 Red Hat, Inc. All rights reserved.
210 #
211@@ -20,7 +20,7 @@
212 # Foundation, Inc., 59 Temple Place - Suite 330,
213 # Boston, MA 02111-1307, USA.
214
215-function is_script() {
216+is_script() {
217 if [ "x$(sed -re '/^[ ]?*[a-zA-Z0-9_]+=.*/{d};/[ ]?*#.*/{d}' $1)" = "x" ]; then
218 return 1
219 else
220@@ -36,13 +36,13 @@
221 unset TERM
222 if [ -r /etc/profile.d/lang.sh ]; then
223 # for Fedora etc
224- source /etc/profile.d/lang.sh
225+ . /etc/profile.d/lang.sh
226 elif [ -r /etc/default/locale ]; then
227 # for Debian
228- source /etc/default/locale
229+ . /etc/default/locale
230 elif [ -r /etc/env.d/02locale ]; then
231 # for Gentoo
232- source /etc/env.d/02locale
233+ . /etc/env.d/02locale
234 fi
235 [ -n "$oldterm" ] && export TERM=$oldterm
236
237@@ -52,16 +52,16 @@
238 unset AUXILIARY_PROGRAM AUXILIARY_ARGS GTK_IM_MODULE ICON IMSETTINGS_IGNORE_ME LONG_DESC PREFERENCE_PROGRAM PREFERENCE_ARGS QT_IM_MODULE SHORT_DESC XIM XIM_PROGRAM XIM_ARGS IS_XIM
239
240 if [ $# -gt 0 ]; then
241- source $1
242+ . $1
243 IMSETTINGS_FILENAME=$1
244 else
245 [ -z "$IMSETTINGS_DISABLE_USER_XINPUTRC" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no
246
247 if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then
248- source "$USER_XINPUTRC"
249+ . "$USER_XINPUTRC"
250 IMSETTINGS_FILENAME=$USER_XINPUTRC
251 elif [ -r "$SYS_XINPUTRC" ]; then
252- source "$SYS_XINPUTRC"
253+ . "$SYS_XINPUTRC"
254 IMSETTINGS_FILENAME=$SYS_XINPUTRC
255 fi
256 fi
This page took 0.088419 seconds and 4 git commands to generate.