Skip to content

Commit

Permalink
Merge pull request #4 from Niklas20114552/testing
Browse files Browse the repository at this point in the history
Update to v1.41
  • Loading branch information
Niklas20114552 authored Jan 23, 2023
2 parents 86a40dc + 33faca0 commit fa0de01
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
12 changes: 11 additions & 1 deletion installed/installer
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ case "$lan" in
"de_DE.UTF-8 UTF-8") slan=de && ask=Deutsch ;;
"en_US.UTF-8 UTF-8") slan=en && ask=English ;;
esac
if [[ ! -f /var/setup/lang.conf ]]; then
curl -o /var/setup/lang.conf https://raw.githubusercontent.com/Niklas20114552/arch-tui-installer/main/installed/lang.conf
fi
lang
if [[ ! $(whoami) == root ]]; then
dialog --title "Installer" --msgbox "$err1" 5 45
Expand All @@ -41,7 +44,7 @@ dialog --title "Installer" --extra-button --extra-label $but1 --msgbox "$lan1" 8
if [[ $? == 3 ]]; then
exit
fi
o1=$(dialog --no-items --title "$tit1" --menu "$lan2" 11 55 11 KDE-Plasma GNOME Xfce4 Cinnamon 3>&1 1>&2 2>&3 3>&-)
o1=$(dialog --no-items --title "$tit1" --menu "$lan2" 12 55 12 KDE-Plasma GNOME Xfce4 Cinnamon Deepin 3>&1 1>&2 2>&3 3>&-)
if [[ $o1 == "" ]]; then
exit
elif [[ $o1 == "KDE-Plasma" ]]; then
Expand All @@ -52,6 +55,8 @@ elif [[ $o1 == "Xfce4" ]]; then
de=xfce
elif [[ $o1 == "Cinnamon" ]]; then
de=cinnamon
elif [[ $o1 == "Deepin" ]]; then
de=deepin
fi
if [ ! -f /usr/bin/paru ] && [ ! -f /usr/bin/yay ]; then
dialog --title "AUR-Helper" --extra-button --no-label "$but2" --yes-label "Paru" --extra-label "Yay" --yesno "$lan3" 8 55
Expand Down Expand Up @@ -85,6 +90,11 @@ elif [[ $de == cinnamon ]]; then
elif [[ $de == xfce ]]; then
pacman --noconfirm --needed -Sy xorg lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings xfce4 xfce4-goodies firefox arc-gtk-theme arc-icon-theme vlc archlinux-wallpaper
systemctl enable lightdm
elif [[ $de == deepin ]]; then
pacman --needed --noconfirm -S xorg lightdm deepin deepin-extra firefox archlinux-wallpaper
sed -i '/^greeter-session=/c\greeter-session=lightdm-deepin-greeter' /etc/lightdm/lightdm.conf
sed -i '/^#greeter-session=/c\greeter-session=lightdm-deepin-greeter' /etc/lightdm/lightdm.conf
systemctl enable lightdm
fi
dialog --title "Setup" --yesno "Jetzt neustarten?" 0 0
if [[ $? == 0 ]]; then
Expand Down
8 changes: 5 additions & 3 deletions lang.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ if [[ $1 == de ]]; then
lan16="Bitte wählen sie die SWAP-Partition"
lan17="Bitte wählen sie die ROOT-Partition \n(Typ: Linux)"
lan18="Diese Partition wird nun FORMATIERT! \nACHTUNG: Dies ZERSTÖRT ALLE DATEN! \n\nFortfahren?"
lan19="Bitte geben sie den KURZNAMEN ein: \nDieser enthält nur kleinbuchstaben und Nummern"
lan19="Bitte geben sie den NUTZERNAMEN ein: \nDieser enthält nur kleinbuchstaben und Nummern"
lan20="Besitzen sie eine AMD oder Nvidia Grafikkarte?"
lan21="Besitzen sie einen AMD oder Intel Prozessor?"
lan22="Welchen AUR-Helper möchten sie installieren? \n\nEin AUR-Helper kompiliert und installiert Pakete aus den Arch User Repository."
lan23="Die Installation wird nun gestartet."
lan24="Jetzt neustarten?"
lan25="Zum Neustarten folgendes ausführen:\n\numount -a\nreboot"
lan26="Bitte geben sie den Vollständigen Namen ein"

mtit="Setup"
tit1="Root-Passwort"
Expand Down Expand Up @@ -71,14 +72,15 @@ elif [[ $1 == en ]]; then
lan16="Please select the SWAP Partition"
lan17="Please select the ROOT partition \n(Type: Linux)"
lan18="This partition will now be FORMAT! \nWARNING: This will DESTROY ALL DATA! \n\nContinue?"
lan19="Please enter the SHORT NAME: \nThis contains only lowercase letters and numbers"
lan19="Please enter the USER NAME: \nThis contains only lowercase letters and numbers"
lan20="Do you have an AMD or Nvidia graphics card?"
lan21="Do you have an AMD or Intel processor?"
lan22="Which AUR helper do you want to install? \n\nAn AUR helper compiles and installs packages from the Arch User Repository."
lan23="The installation will now start."
lan24="Reboot now?"
lan25="To reboot, run: \n\numount -a \nreboot"

lan26="Please enter the full name"

mtit="Setup"
tit1="Root-Password"
tit2="User-Password"
Expand Down
23 changes: 14 additions & 9 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ d2=$(find /dev/vd* -not -name '*[0-9]' | tr "\n" " ")
d3=$(find /dev/hd* -not -name '*[0-9]' | tr "\n" " ")
drives="$d1 $d2 $d3"
drives=$(echo $drives)
o6=$(dialog --no-cancel --no-items --title "$tit6" --menu "$lan10" 20 20 5 $drives 3>&1 1>&2 2>&3 3>&-)
drivec=${drives// /,}
o6=$(dialog --cr-wrap --no-collapse --no-cancel --no-items --title "$tit6" --menu "$lan10 \n\n$(lsblk --output NAME,MODEL,SIZE /dev/{vd*,sd*,hd*}[!0-9])" 0 0 0 $drives 3>&1 1>&2 2>&3 3>&-)
boot_drive=$o6
if [[ -d /sys/firmware/efi ]]; then
dialog --title "$tit7a $boot_drive" --msgbox "$lan11" 10 73
Expand All @@ -78,14 +79,15 @@ if [[ "$partition" == "" ]]; then
exit
fi
fi
lsblk $o6 --output NAME,PARTTYPENAME,SIZE
if [[ -d /sys/firmware/efi ]]; then
e1=$(dialog --no-cancel --no-items --title "$tit7b" --menu "$lan13" 20 34 5 $partition 3>&1 1>&2 2>&3 3>&-)
e1=$(dialog --cr-wrap --no-collapse --no-cancel --no-items --title "$tit7b" --menu "$lan13 \n\n$(lsblk $o6 --output NAME,PARTTYPENAME,SIZE)" 0 0 0 $partition 3>&1 1>&2 2>&3 3>&-)
dialog --title "$tit8 $e1" --yesno "$lan14" 0 0
if [[ $? == 0 ]]; then
yes | mkfs.vfat $e1
fi
fi
o7=$(dialog --no-cancel --no-items --title "$tit7b" --menu "$lan17" 20 20 5 $partition 3>&1 1>&2 2>&3 3>&-)
o7=$(dialog --cr-wrap --no-collapse --no-cancel --no-items --title "$tit7b" --menu "$lan17 \n\n$(lsblk $o6 --output NAME,PARTTYPENAME,SIZE)" 0 0 0 $partition 3>&1 1>&2 2>&3 3>&-)
dialog --title "$tit8 $o7" --default-button no --yesno "$lan18" 8 45
if [[ $? == 1 ]]; then
dialog --title "$err3" --msgbox "$err5" 6 45
Expand All @@ -96,11 +98,12 @@ yes | mkfs.ext4 $o7
dialog --title "$tit9" --yesno "$lan15" 5 45
if [[ $? == 0 ]]; then
swap=yes
o8=$(dialog --no-cancel --no-items --title "$tit7b" --menu "$lan16" 20 20 5 $partition 3>&1 1>&2 2>&3 3>&-)
o8=$(dialog --cr-wrap --no-collapse --no-cancel --no-items --title "$tit7b" --menu "$lan16 \n\n$(lsblk $o6 --output NAME,PARTTYPENAME,SIZE)" 0 0 0 $partition 3>&1 1>&2 2>&3 3>&-)
yes | mkswap $o8
fi
rootpw
user_name=$(dialog --no-cancel --title "$tit10" --inputbox "$lan19" 9 45 3>&1 1>&2 2>&3 3>&-)
full_name=$(dialog --no-cancel --title "$tit10" --inputbox "$lan26" 9 45 3>&1 1>&2 2>&3 3>&-)
userpw
dialog --title "$tit11" --no-label AMD --yes-label Nvidia --yesno "$lan20" 6 45
if [[ $? == 1 ]]; then
Expand All @@ -126,7 +129,12 @@ mkdir -p /target/boot/efi
mount "$e1" /target/boot/efi
pacman --noconfirm -Sy archlinux-keyring

pacstrap /target base linux linux-firmware git nano $cpu iptables-nft neovim
pacstrap /target base linux linux-firmware git nano $cpu iptables-nft neovim vim

if [[ $swap == yes ]]; then
swapon "$o8"
fi

genfstab -U /target >> /target/etc/fstab

ln -sf $timezone /target/etc/localtime
Expand Down Expand Up @@ -163,6 +171,7 @@ echo "echo '$user_name:$user_pass' | chpasswd" >> /target/chpasswd.sh
arch-chroot /target bash /chpasswd.sh
rm -rf /target/chpasswd.sh
echo "%wheel ALL=(ALL:ALL) ALL" > /target/etc/sudoers.d/wheel
arch-chroot /target bash -c "chfn --full-name '$full_name' $user_name"
if [[ -f /var/setup/installed.conf ]]; then
cp /var/setup/installed.conf /target/var/setup/lang.conf
else
Expand Down Expand Up @@ -192,10 +201,6 @@ if [ "$aur" == "paru-bin" ] || [ "$aur" == "yay-bin" ]; then
arch-chroot /target bash -c "(cd /tmp_aur && /var/setup/sumkpkg -si --noconfirm)"
rm -rf /target/tmp_aur
fi
if [[ $swap == yes ]]; then
arch-chroot /target bash -c "swapon '$o8'"
echo "$o8 swap swap defaults 0 0" >> /target/etc/fstab
fi

if [[ $1 == --debug ]]; then
echo DEBUG -- PAUSE -- PRESS ENTER
Expand Down

0 comments on commit fa0de01

Please sign in to comment.