Blame engine/ibus-engine-table.in

Packit 30c44c
#!/bin/sh
Packit 30c44c
# vim:set et sts=4 sw=4
Packit 30c44c
#
Packit 30c44c
# ibus-table - The Tables engine for IBus
Packit 30c44c
#
Packit 30c44c
# Copyright (c) 2008-2009 Yu Yuwei <acevery@gmail.com>
Packit 30c44c
#
Packit 30c44c
# This library is free software; you can redistribute it and/or
Packit 30c44c
# modify it under the terms of the GNU Lesser General Public
Packit 30c44c
# License as published by the Free Software Foundation; either
Packit 30c44c
# version 2.1 of the License, or (at your option) any later version.
Packit 30c44c
#
Packit 30c44c
# This library is distributed in the hope that it will be useful,
Packit 30c44c
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 30c44c
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 30c44c
# Lesser General Public License for more details.
Packit 30c44c
#
Packit 30c44c
# You should have received a copy of the GNU Lesser General Public
Packit 30c44c
# License along with this library; if not, write to the Free Software
Packit 30c44c
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit 30c44c
#
Packit 30c44c
Packit 30c44c
prefix=@prefix@
Packit 30c44c
exec_prefix=@prefix@
Packit 30c44c
datarootdir=@datarootdir@
Packit 30c44c
datadir=@datadir@
Packit 30c44c
export IBUS_TABLE_LOCATION=@datarootdir@/ibus-table
Packit 30c44c
export IBUS_TABLE_LIB_LOCATION=@libexecdir@
Packit 30c44c
Packit 30c44c
# Set this variable to something > 0 to get more debug output.
Packit 30c44c
# (Debug output may show up in the log file and/or in the lookup table):
Packit 30c44c
# export IBUS_TABLE_DEBUG_LEVEL=1
Packit 30c44c
#
Packit 30c44c
# Set this to something if you want benchmarking (The profiling output
Packit 30c44c
# will appear in the debug long when "ibus restart" is executed):
Packit 30c44c
# export IBUS_TABLE_PROFILE=yes
Packit 30c44c
Packit 30c44c
for arg in $@; do
Packit 30c44c
	case $arg in
Packit 30c44c
	--xml | -x)
Packit 30c44c
		exec @PYTHON@ @datarootdir@/ibus-table/engine/main.py --xml;;
Packit 30c44c
	--help | -h)
Packit 30c44c
		exec @PYTHON@ @datarootdir@/ibus-table/engine/main.py $@;;
Packit 30c44c
        *)
Packit 30c44c
                if [ "x${IBUS_TABLE_PROFILE}" != "x" ]; then
Packit 30c44c
                    exec @PYTHON@ @datarootdir@/ibus-table/engine/main.py --profile $@
Packit 30c44c
                else
Packit 30c44c
                    exec @PYTHON@ @datarootdir@/ibus-table/engine/main.py $@
Packit 30c44c
                fi
Packit 30c44c
                exit 0
Packit 30c44c
	esac
Packit 30c44c
done
Packit 30c44c