File: harmattan.bash

package info (click to toggle)
marble 4%3A25.08.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 159,996 kB
  • sloc: cpp: 191,890; xml: 39,908; ansic: 7,204; python: 2,190; sh: 1,187; makefile: 235; perl: 218; ruby: 97; java: 66
file content (28 lines) | stat: -rwxr-xr-x 746 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

set -e

which wget > /dev/null

ROOT_DIR="$(dirname $0)/../.."
LANG_DIR="${ROOT_DIR}/data/lang"
MAP_DIR="${ROOT_DIR}/data/maps"
TR_TOOL="${ROOT_DIR}/tools/translations/marble_qt_i18n.bash"

test -e "${LANG_DIR}" || { echo "Creating data/lang directory."; mkdir "${LANG_DIR}"; }
test -d "${LANG_DIR}"
test -e "${MAP_DIR}"
test -d "${MAP_DIR}"

test -e "${TR_TOOL}"
test -f "${TR_TOOL}"
test -x "${TR_TOOL}"

for map in venus mars hikebikemap public-transport
do
  echo "Installing ${map} map theme to $(readlink -f ${MAP_DIR})"
  wget -q "http://files.kde.org/marble/newstuff/maps/${map}-marblemap.tar.gz" -O - | tar -C "${MAP_DIR}" -xzf -
done

echo "Generating translations in $(readlink -f ${LANG_DIR})"
"${TR_TOOL}" "${LANG_DIR}"