File indexing completed on 2024-03-24 15:23:36

0001 #!/bin/bash
0002 
0003 set -e
0004 
0005 which wget > /dev/null
0006 
0007 ROOT_DIR="$(dirname $0)/../.."
0008 LANG_DIR="${ROOT_DIR}/data/lang"
0009 MAP_DIR="${ROOT_DIR}/data/maps"
0010 TR_TOOL="${ROOT_DIR}/tools/translations/marble_qt_i18n.bash"
0011 
0012 test -e "${LANG_DIR}" || { echo "Creating data/lang directory."; mkdir "${LANG_DIR}"; }
0013 test -d "${LANG_DIR}"
0014 test -e "${MAP_DIR}"
0015 test -d "${MAP_DIR}"
0016 
0017 test -e "${TR_TOOL}"
0018 test -f "${TR_TOOL}"
0019 test -x "${TR_TOOL}"
0020 
0021 for map in venus mars hikebikemap public-transport
0022 do
0023   echo "Installing ${map} map theme to $(readlink -f ${MAP_DIR})"
0024   wget -q "http://files.kde.org/marble/newstuff/maps/${map}-marblemap.tar.gz" -O - | tar -C "${MAP_DIR}" -xzf -
0025 done
0026 
0027 echo "Generating translations in $(readlink -f ${LANG_DIR})"
0028 "${TR_TOOL}" "${LANG_DIR}"