From 1f712ba1037ecba530f2d2937b06c1d6b65b53c3 Mon Sep 17 00:00:00 2001 From: xavierqet Date: Sun, 17 Aug 2008 21:47:07 +0000 Subject: [PATCH] Ajout d'un script bash facilitant le lancement de QET en utilisant la collection et les fichiers de langue du repertoire de travail git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@380 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- misc/launch_qet.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 misc/launch_qet.sh diff --git a/misc/launch_qet.sh b/misc/launch_qet.sh new file mode 100755 index 000000000..a8bb43709 --- /dev/null +++ b/misc/launch_qet.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# configuration +QET_EXE="../qelectrotech" +QET_ELEMENTS_DIR="../elements/" +QET_CONFIG_DIR="" +QET_LANG_DIR="../lang/" +REDEFINE_LANG="" + +# checks for the qelectrotech binary executable file +if [ ! -x "${QET_EXE}" ]; then + echo "Errror : executable file not found. Aborting." + exit 1 +fi + +# checks options that will be given to QET +OPTIONS="" + +if [ -d "${QET_ELEMENTS_DIR}" ]; then + OPTIONS="${OPTIONS} --common-elements-dir=${QET_ELEMENTS_DIR}" +fi + +if [ -d "${QET_CONFIG_DIR}" ]; then + OPTIONS="${OPTIONS} --config-dir=${QET_CONFIG_DIR}" +fi + +if [ -d "${QET_LANG_DIR}" ]; then + OPTIONS="${OPTIONS} --lang-dir=${QET_LANG_DIR}" +fi + +if [ "${REDEFINE_LANG}" ]; then + export LANG="${REDEFINE_LANG}" +fi + +# launching +${QET_EXE} ${OPTIONS} $*