summaryrefslogtreecommitdiff
path: root/configs/lxde-openrc/airootfs/root/.language.sh
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2018-05-16 21:08:49 -0400
committerDavid P <megver83@parabola.nu>2018-05-16 21:27:46 -0400
commit765756ae126d57735c22d59a7c1242f01443921e (patch)
treec5d5f3e7979f5a0098e7294d1e8dbae3aa71c562 /configs/lxde-openrc/airootfs/root/.language.sh
parentff5f93347993bfdb6c58746baee006dbad7a3dd8 (diff)
modify entire source according to archiso32
and remove unused configs/talkingparabola-X11 Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'configs/lxde-openrc/airootfs/root/.language.sh')
-rwxr-xr-xconfigs/lxde-openrc/airootfs/root/.language.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/configs/lxde-openrc/airootfs/root/.language.sh b/configs/lxde-openrc/airootfs/root/.language.sh
new file mode 100755
index 0000000..11e986e
--- /dev/null
+++ b/configs/lxde-openrc/airootfs/root/.language.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+#Comprobe if language was selected
+code=$(cat ~/.codecheck | grep LANG= | tail --bytes 2)
+if [ $code = "0" ]; then
+ lang=$(dialog --stdout --backtitle "System language selection" --menu "Choose your language:" 15 40 10 \
+ "en_US.UTF-8" "English" \
+ "gl_ES.UTF-8" "Galego" \
+ "es_ES.UTF-8" "Spanish" \
+ "pt_BR.UTF-8" "Brazilian Portuguese" \
+ "pl_PL.UTF-8" "Polish" \
+ "it_IT.UTF-8" "Italian" \
+ "fr_FR.UTF-8" "French" \
+ "eo" "Esperanto")
+
+ #Copy locale in locale.conf
+ [ $lang = "" ] || echo "LANG=$lang" > /etc/locale.conf
+
+ #Put a new line confirm that language was selected
+ sed -i '/LANG=./d' ~/.codecheck
+ echo "LANG=1" >> ~/.codecheck
+
+ #Copy scripts to install in that language
+ case ${lang/_*/} in
+ en|gl|es|pt) cp -a ~/.scriptsInstallation/language/${lang/_*/}/* ~/.scriptsInstallation/
+ cp ~/.scriptsInstallation/install.sh ~/
+ ;;
+ *) cp -a ~/.scriptsInstallation/language/en/* ~/.scriptsInstallation/
+ cp ~/.scriptsInstallation/install.sh ~/
+ ;;
+ esac
+fi