#bashism patch
tags 772253 + patch
thanks

why not fix this bug ?
>From b9b181a4ab11f33b70f9e142e950242363271f77 Mon Sep 17 00:00:00 2001
From: Zhang Jingqiang <zh...@outlook.com>
Date: Sun, 19 Jul 2015 10:55:34 +0800
Subject: [PATCH] Add 0003-fix-bashisms.patch

---
 debian/patches/0003-fix-bashisms.patch | 35 ++++++++++++++++++++++++++++++++++
 debian/patches/series                  |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 debian/patches/0003-fix-bashisms.patch

diff --git a/debian/patches/0003-fix-bashisms.patch b/debian/patches/0003-fix-bashisms.patch
new file mode 100644
index 0000000..fbb448d
--- /dev/null
+++ b/debian/patches/0003-fix-bashisms.patch
@@ -0,0 +1,35 @@
+diff --git a/data/env_setup.sh b/data/env_setup.sh
+index 5c909ff..fb89464 100644
+--- a/data/env_setup.sh
++++ b/data/env_setup.sh
+@@ -31,7 +31,7 @@ detect_qt()
+ detect_qt_im_module()
+ {
+     QTPATH=`qmake -query QT_INSTALL_PLUGINS`
+-    ls $QTPATH/inputmethods/*fcitx* &> /dev/null
++    ls $QTPATH/inputmethods/*fcitx* > /dev/null 2>&1
+ }
+ 
+ if [ -z "$XMODIFIERS" ]; then
+diff --git a/src/ui/classic/fcitx-skin-installer.sh b/src/ui/classic/fcitx-skin-installer.sh
+index 0977f74..9d18af4 100644
+--- a/src/ui/classic/fcitx-skin-installer.sh
++++ b/src/ui/classic/fcitx-skin-installer.sh
+@@ -25,7 +25,7 @@ else
+     }
+ fi
+ 
+-if type gettext > /dev/null 2>&1; then
++if which gettext > /dev/null 2>&1; then
+     _() {
+         gettext "$@"
+     }
+@@ -52,7 +52,7 @@ if [ "$(echo "${_filelist}" | grep -c '^[^/]*/$' 2> /dev/null)" != "1" ]; then
+ fi
+ 
+ if ! echo "${_filelist}" | grep "^[^/]*/fcitx_skin.conf" > /dev/null 2>&1; then
+-    error "$(_ "Error: skin file doesn't contain skin config.")"
++    error "$(_ Error: skin file doesn\'t contain skin config.)"
+     exit 1
+ fi
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 5dd82ad..99b6e5a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-try-to-avoid-rpath.patch
 0002-wait-dbus-up-to-20-times.patch
+0003-fix-bashisms.patch
-- 
2.1.4

Reply via email to