start clean-up whitespace...

merge-requests/273/head
Bernhard Landauer 8 years ago
parent a5a4c9bad1
commit e278a7fbb2

@ -25,6 +25,7 @@ ANSWER="/tmp/.aif" # Basic menu selections
PACKAGES="/tmp/.pkgs" # Packages to install
MOUNT_OPTS="/tmp/.mnt_opts" # Filesystem Mount options
INIT="/tmp/.init"
# Save retyping
VERSION="Manjaro Installation Framework 0.7"
@ -98,7 +99,6 @@ FILE="" # File(s) to be reviewed
# Add locale on-the-fly and sets source translation file for installer
select_language() {
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " Select Language " --menu "\nLanguage" 0 0 10 \
"1" $"English (en_**)" \
"2" $"Español (es_ES)" \
@ -168,14 +168,15 @@ select_language() {
[[ $FONT != "" ]] && setfont $FONT
}
set_lightdm_greeter(){
local greeters=$(ls /mnt/usr/share/xgreeters/*greeter.desktop) name
for g in ${greeters[@]};do
name=${g##*/}
name=${name%%.*}
case ${name} in
lightdm-gtk-greeter) break ;;
lightdm-gtk-greeter)
break
;;
lightdm-*-greeter)
sed -i -e "s/^.*greeter-session=.*/greeter-session=${name}/" /mnt/etc/lightdm/lightdm.conf
;;
@ -186,7 +187,6 @@ set_lightdm_greeter(){
# Check user is root, and that there is an active internet connection
# Seperated the checks into seperate "if" statements for readability.
check_requirements() {
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_ChkTitle " --infobox "$_ChkBody" 0 0
sleep 2
@ -232,8 +232,6 @@ id_system() {
else
SYSTEM="BIOS"
fi
}
@ -242,7 +240,6 @@ arch_chroot() {
manjaro-chroot $MOUNTPOINT "${1}"
}
set_sddm_ck(){
local halt='/usr/bin/shutdown -h -P now' \
reboot='/usr/bin/shutdown -r now'
@ -255,33 +252,27 @@ set_sddm_ck(){
# If there is an error, display it, clear the log and then go back to the main menu (no point in continuing).
check_for_error() {
if [[ $? -eq 1 ]] && [[ $(cat /tmp/.errlog | grep -i "error") != "" ]]; then
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_ErrTitle " --msgbox "$(cat /tmp/.errlog)" 0 0
echo "" > /tmp/.errlog
main_menu_online
fi
}
# Ensure that a partition is mounted
check_mount() {
if [[ $(lsblk -o MOUNTPOINT | grep ${MOUNTPOINT}) == "" ]]; then
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_ErrTitle " --msgbox "$_ErrNoMount" 0 0
main_menu_online
fi
}
# Ensure that Manjaro has been installed
check_base() {
if [[ ! -e ${MOUNTPOINT}/etc ]]; then
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_ErrTitle " --msgbox "$_ErrNoBase" 0 0
main_menu_online
fi
}
# Simple code to show devices / partitions.
@ -311,55 +302,6 @@ configure_mirrorlist() {
pacman-mirrors -g -b $(cat ${BRANCH}) -i
}
# Generate a mirrorlist based on the country chosen.
#mirror_by_country() {
# BRANCH="/tmp/.branch"
# COUNTRY_LIST=""
# countries_list="Africa AF Australia AU Austria AT Belarus BY Belgium BE Brasil BR Bulgaria BG Canada CA Chile CL China CN Colombia CO Costa_Rica CR Czech CZ Denmark DK Ecuador EQ France FR Germany DE Greece GR Indonesia ID Ireland IE Italy IT Japan JP Netherlands NL Philippines PH Poland PL Portugal PT Romania RO Russia RU Singapore SG Sweden SE Taiwan TW Turkey TR United_Kingdom GB United_States US Vietnam VN"
#
# for i in ${countries_list}; do
# COUNTRY_LIST="${COUNTRY_LIST} ${i}"
# done
#
# dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_MirrorlistTitle " --menu "$_MirrorCntryBody" 0 0 0 $COUNTRY_LIST 2>${ANSWER} || install_base_menu
#
# #URL="https://www.archlinux.org/mirrorlist/?country=$(cat ${ANSWER})&use_mirror_status=on"
# #Choose the branch for mirrorlist
# MIRROR_TEMP=$(mktemp --suffix=-mirrorlist)
# dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " Choose Manjaro branch to use " --radiolist " $_UseSpaceBar" 0 0 3 \
# "stable" "-" on \
# "testing" "-" off \
# "unstable" "-" off 2>${BRANCH}
#
# # Get latest mirror list and save to tmpfile
# dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_MirrorlistTitle " --infobox "$_PlsWaitBody" 0 0
# pacman-mirrors -g -b $(cat ${BRANCH}) -c $(cat ${ANSWER}) -o ${MIRROR_TEMP} 2>/tmp/.errlog
## curl -so ${MIRROR_TEMP} ${URL} 2>/tmp/.errlog
# check_for_error
# sed -i 's/^#Server/Server/g' ${MIRROR_TEMP}
# nano ${MIRROR_TEMP}
#
# dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_MirrorlistTitle " --yesno "$_MirrorGenQ" 0 0
#
# if [[ $? -eq 0 ]];then
# mv -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
# mv -f ${MIRROR_TEMP} /etc/pacman.d/mirrorlist
# chmod +r /etc/pacman.d/mirrorlist
# dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_MirrorlistTitle " --infobox "\n$_Done!\n\n" 0 0
# sleep 2
# else
# configure_mirrorlist
# fi
#}
#dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_MirrorlistTitle " \
# --menu "$_MirrorlistBody" 0 0 5 \
# "1" "$_MirrorbyCountry" \
# "2" "$_MirrorEdit" \
# "3" "$_MirrorRestTitle" \
# "4" "$_MirrorPacman" \
# "5" "$_Back" 2>${ANSWER}
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_MirrorlistTitle " \
--menu "$_MirrorlistBody" 0 0 4 \
"1" "$_MirrorRankTitle" \
@ -367,26 +309,6 @@ dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_MirrorlistTitle " \
"3" "$_MirrorPacman" \
"4" "$_Back" 2>${ANSWER}
# case $(cat ${ANSWER}) in
# "1") mirror_by_country
# ;;
# "2") nano /etc/pacman.d/mirrorlist
# ;;
# "3") if [[ -e /etc/pacman.d/mirrorlist.orig ]]; then
# mv -f /etc/pacman.d/mirrorlist.orig /etc/pacman.d/mirrorlist
# dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_MirrorlistTitle " --msgbox "\n$_Done!\n\n" 0 0
# else
# dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_ErrTitle " --msgbox "$_MirrorNoneBody" 0 0
# fi
# ;;
# "4") nano /etc/pacman.conf
# dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_MirrorPacman " --yesno "$_MIrrorPacQ" 0 0 && COPY_PACCONF=1 || COPY_PACCONF=0
# pacman -Syy
# ;;
# *) install_base_menu
# ;;
# esac
case $(cat ${ANSWER}) in
"1") rank_mirrors
;;
@ -1432,7 +1354,7 @@ check_lv_size() {
# Specify number of Logical volumes to create.
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_LvmCreateVG " --radiolist "$_LvmLvNumBody1 ${LVM_VG}. $_LvmLvNumBody2" 0 0 9 \
"1" "-" off "2" "-" off "3" "-" off "4" "-" off "5" "-" off "6" "-" off "7" "-" off "8" "-" off "9 " "-" off 2>${ANSWER}
"1" "-" off "2" "-" off "3" "-" off "4" "-" off "5" "-" off "6" "-" off "7" "-" off "8" "-" off "9" "-" off 2>${ANSWER}
[[ $(cat ${ANSWER}) == "" ]] && lvm_menu || NUMBER_LOGICAL_VOLUMES=$(cat ${ANSWER})

Loading…
Cancel
Save