summaryrefslogtreecommitdiff
path: root/configs/lxde-openrc/airootfs
diff options
context:
space:
mode:
Diffstat (limited to 'configs/lxde-openrc/airootfs')
-rwxr-xr-xconfigs/lxde-openrc/airootfs/root/.keymap.sh12
-rwxr-xr-xconfigs/lxde-openrc/airootfs/root/.language.sh12
2 files changed, 12 insertions, 12 deletions
diff --git a/configs/lxde-openrc/airootfs/root/.keymap.sh b/configs/lxde-openrc/airootfs/root/.keymap.sh
index 0823fde..c6ed5fd 100755
--- a/configs/lxde-openrc/airootfs/root/.keymap.sh
+++ b/configs/lxde-openrc/airootfs/root/.keymap.sh
@@ -1,13 +1,13 @@
#!/bin/bash
#Comprobe if X11 keymap was selected
-code=$(cat .codecheck | grep XKBMAP= | cut -d '=' -f 2)
-keymaps_list=$(sed -e '/! layout/,/^$/!d;/! layout/d;s/ /_/g;s/__/ /g;s/ _//' /usr/share/X11/xkb/rules/evdev.lst | sort)
+code="$(grep XKBMAP= .codecheck | cut -d '=' -f 2)"
+keymaps_list="$(sed -e '/! layout/,/^$/!d;/! layout/d;s/ /_/g;s/__/ /g;s/ _//' /usr/share/X11/xkb/rules/evdev.lst | sort)"
+
if [[ $code = "0" ]]; then
- keymap=$(zenity --list --title="Select your keymap" --column="Code Name" --column="Keymap" --hide-column=1 $keymaps_list)
-
- setxkbmap $keymap
-
+ keymap=$(zenity --list --title="Select your keymap" --column="Code Name" --column="Keymap" --hide-column=1 "$keymaps_list")
+ setxkbmap "$keymap"
+
#Save XKBMAP in .codecheck to use in other time. For example if you install X11 with scripts
sed -i '/XKBMAP=./d' ~/.codecheck
echo "XKBMAP=$keymap" >> ~/.codecheck
diff --git a/configs/lxde-openrc/airootfs/root/.language.sh b/configs/lxde-openrc/airootfs/root/.language.sh
index 11e986e..acce4bb 100755
--- a/configs/lxde-openrc/airootfs/root/.language.sh
+++ b/configs/lxde-openrc/airootfs/root/.language.sh
@@ -1,8 +1,8 @@
#!/bin/bash
#Comprobe if language was selected
-code=$(cat ~/.codecheck | grep LANG= | tail --bytes 2)
-if [ $code = "0" ]; then
+code=$(grep LANG= ~/.codecheck | 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" \
@@ -12,17 +12,17 @@ if [ $code = "0" ]; then
"it_IT.UTF-8" "Italian" \
"fr_FR.UTF-8" "French" \
"eo" "Esperanto")
-
+
#Copy locale in locale.conf
- [ $lang = "" ] || echo "LANG=$lang" > /etc/locale.conf
+ [ -z "$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/
+ en|gl|es|pt) cp -a ~/.scriptsInstallation/language/"${lang/_*/}"/* ~/.scriptsInstallation/
cp ~/.scriptsInstallation/install.sh ~/
;;
*) cp -a ~/.scriptsInstallation/language/en/* ~/.scriptsInstallation/