This repository was archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinstall_languages.sh
More file actions
executable file
·55 lines (48 loc) · 1.48 KB
/
install_languages.sh
File metadata and controls
executable file
·55 lines (48 loc) · 1.48 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
# -*- coding: utf8 -*-
#
# Copyright (c) 2015 unfoldingWord
# http://creativecommons.org/licenses/MIT/
# See LICENSE file for details.
#
# Contributors:
# Richard Mahn <richard_mahn@wycliffeassociates.org>
#
# Ussage: install_languages.sh [IETF-code [IETF-code...]]
#
# Defaults to installing am, en, es, fr, and pt-br
# DEBUG - true/false - If true, will run "set -x"
: ${DEBUG:=false}
# If running in DEBUG mode, output information about every command being run
$DEBUG && set -x
: ${DOOR43_DIR:=$(cd $(dirname "$0") > /dev/null && pwd)}
if [ -z $1 ];
then
# default installed languages
LANGUAGES=( 'am' 'en' 'es' 'fr' 'pt-br' )
else
LANGUAGES=($@)
fi
pushd $DOOR43_DIR > /dev/null
echo "About pull these language repos: ${LANGUAGES[*]}"
read -r -n 1 -p "Do you want to pull languages repos (Can take some time)? [y/N] " response
echo ""
echo ""
case $response in
[yY][eE][sS]|[yY])
echo 'Checking out language repos...';
for lang in "${LANGUAGES[@]}"
do
echo "Cloning d43-${lang} into data/gitrepo/pages/${lang}"
git clone "git@github.com:Door43/d43-${lang}" "data/gitrepo/pages/${lang}"
done
;;
*)
echo "Ok. If you want to install them later, either run"
echo " $DOOR43_DIR/install_language.sh <IETF-CODE> (can supply lang code, defaults to ${LANGUAGES[*]})"
echo "or run:"
echo " git clone git@github.com:Door43/d43-<IETF-CODE> $DOOR43_DIR/data/gitrepo/pages/<IETF-CODE>"
;;
esac
echo "Installed Languages"
echo ""