2008-08-17 21:47:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2009-06-18 21:58:30 +00:00
|
|
|
current_dir=$(dirname "$0")
|
|
|
|
|
2008-08-17 21:47:07 +00:00
|
|
|
# configuration
|
2010-12-19 17:16:30 +00:00
|
|
|
QET_EXE=$(readlink -f "${current_dir}/../qelectrotech")
|
|
|
|
QET_ELEMENTS_DIR=$(readlink -f "${current_dir}/../elements/")
|
2012-01-08 23:36:50 +00:00
|
|
|
QET_TBT_DIR=$(readlink -f "${current_dir}/../titleblocks/")
|
2008-08-17 21:47:07 +00:00
|
|
|
QET_CONFIG_DIR=""
|
2010-12-19 17:16:30 +00:00
|
|
|
QET_LANG_DIR=$(readlink -f "${current_dir}/../lang/")
|
2009-04-03 19:30:25 +00:00
|
|
|
# REDEFINE_LANG="es"
|
2008-08-17 21:47:07 +00:00
|
|
|
|
|
|
|
# checks for the qelectrotech binary executable file
|
|
|
|
if [ ! -x "${QET_EXE}" ]; then
|
2022-12-04 16:54:51 -05:00
|
|
|
echo "Error : executable file not found. Aborting."
|
2008-08-17 21:47:07 +00:00
|
|
|
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
|
|
|
|
|
2012-01-08 23:36:50 +00:00
|
|
|
if [ -d "${QET_TBT_DIR}" ]; then
|
|
|
|
OPTIONS="${OPTIONS} --common-tbt-dir=${QET_TBT_DIR}"
|
|
|
|
fi
|
|
|
|
|
2008-08-17 21:47:07 +00:00
|
|
|
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} $*
|