Clean code

This commit is contained in:
MatMoul 2015-10-10 21:35:08 +02:00
parent 1301b1e9f7
commit a2ca37e5be

17
archfi
View file

@ -98,12 +98,9 @@ setkeymap(){
#for item in $items; do
# options+=("$item" "")
#done
#items=$(find /usr/share/kbd/keymaps/ -type f)
items=$(find /usr/share/kbd/keymaps/ -type f -printf "%f\n" | sort -V)
options=()
for item in $items; do
#item=$(basename "$item")
#item=${item%%.*}
options+=("${item%%.*}" "")
done
keymap=$(whiptail --backtitle "$apptitle" --title "$txtsetkeymap" --menu "" 0 0 0 \
@ -826,12 +823,9 @@ archsetkeymap(){
#for item in $items; do
# options+=("$item" "")
#done
#items=$(find /usr/share/kbd/keymaps/ -type f)
items=$(find /usr/share/kbd/keymaps/ -type f -printf "%f\n" | sort -V)
options=()
for item in $items; do
#item=$(basename "$item")
#item=${item%%.*}
options+=("${item%%.*}" "")
done
keymap=$(whiptail --backtitle "$apptitle" --title "$txtsetkeymap" --menu "" 0 0 0 \
@ -959,11 +953,6 @@ archinstallgrub(){
clear
pacstrap /mnt grub
#if (whiptail --backtitle "$apptitle" --title "${txtinstall//%1/grub}" --yesno "$txtinstallosprober" --defaultno 0 0) then
# clear
# pacstrap /mnt os-prober
#fi
if [ "$efimode" = "1" ]||[ "$efimode" = "2" ]; then
if (whiptail --backtitle "$apptitle" --title "${txtinstall//%1/efibootmgr}" --yesno "$txtefibootmgr" 0 0) then
clear
@ -1103,8 +1092,6 @@ archdidownload(){
}
archdiinstallandlaunchchroot(){
cd
#curl -L archdi.sourceforge.net/archdi >archdi
#curl -L matmoul.github.io/archdi >archdi >archdi
archdidownload
sh archdi -i
archdi --chroot
@ -1112,8 +1099,6 @@ archdiinstallandlaunchchroot(){
}
archdilaunchchroot(){
cd
#curl -L archdi.sourceforge.net/archdi >archdi
#curl -L matmoul.github.io/archdi >archdi >archdi
archdidownload
sh archdi --chroot
rm archdi
@ -1121,8 +1106,6 @@ archdilaunchchroot(){
}
archdiinstallchroot(){
cd
#curl -L archdi.sourceforge.net/archdi >archdi
#curl -L matmoul.github.io/archdi >archdi >archdi
archdidownload
sh archdi -i
exit