diff --git a/Amelia.sh b/Amelia.sh index ad005d7..3a355d7 100644 --- a/Amelia.sh +++ b/Amelia.sh @@ -1,7 +1,7 @@ #!/bin/bash # Amelia Installer -# Version: 3.1 +# Version: 3.2 ########################################################################################### # ### COLOR FUNCTIONS ### @@ -18,34 +18,34 @@ reverse="\e[7m" bright="\e[1m" bwhite="\e[0;97m" -RED(){ +RED (){ echo -e "${red} $1${nc}" } -REDB(){ +REDB (){ echo -e "${redb} $1${nc}" } -REDBG(){ +REDBG (){ echo -e "${redbg} $1${nc}" } -GREEN(){ +GREEN (){ echo -e "${green} $1${nc}" } -YELLOW(){ +YELLOW (){ echo -e "${yellow} $1${nc}" } -BLUE(){ +BLUE (){ echo -e "${blue} $1${nc}" } -CYAN(){ +CYAN (){ echo -e "${cyan} $1${nc}" } -PURPLE(){ +PURPLE (){ echo -e "${purple} $1${nc}" } -NC(){ +NC (){ echo -e "${nc} $1${nc}" } -WHITEB(){ +WHITEB (){ echo -e "${bwhite} $1${nc}" } @@ -274,7 +274,6 @@ REDBG " ---------------------------------------- ########################################################################################### slct_font (){ - local prompt="Fonts" sleep 0.5 NC " ______________________ @@ -305,7 +304,6 @@ Enter a number: " return 1 fi clear - ok } ########################################################################################### uefi_check (){ @@ -313,6 +311,9 @@ uefi_check (){ local prompt="UEFI Mode" sleep 0.5 NC " + + + ______________________________ ${purple}###${nc} UEFI Mode Verification ${purple}###${nc} @@ -385,7 +386,7 @@ ${purple}###${nc} Main Menu ${purple}###${nc} [3] Disk Management - [4] Start Installation " + [4] Start Installation (Auto-Navigated) " BLUE " @@ -740,7 +741,7 @@ Enter a number: " "") until main_menu; do : ; done ;; *) - invalidlocal + invalid return 1 ;; esac } @@ -1636,6 +1637,7 @@ Enter your Kernel parameters ${bwhite}(space-seperated)${blue}: " boot_entr (){ local prompt="Boot Entries" + efi_entr_del="1" sleep 0.5 NC " _________________________________ @@ -1689,6 +1691,7 @@ Enter a${nc} ${cyan}BootOrder${blue} number for Deletion ${bwhite}(empty to skip wireless_rgd (){ local prompt="Wireless Regdom Setup" + wrlss_rgd="1" hypervisor="$(systemd-detect-virt)" sleep 0.5 NC " @@ -1704,6 +1707,7 @@ ${purple}###${nc} Wireless Regulatory Domain Setup ${purple}###${nc} " skip ok + NC return 0 fi @@ -1843,7 +1847,7 @@ ______________________________________________ skip ok - if [[ "${install}" == "1" ]]; then + if [[ "${install}" == "yes" ]]; then until instl_dsk; do : ; done else until dsks_submn; do : ; done @@ -1919,8 +1923,10 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: " until dsks_submn; do : ; done elif [[ "${sanity}" == "no" ]]; then until instl_dsk; do : ; done + elif [[ "${revision}" == "yes" ]]; then + return 0 elif [[ "${sanity}" == "ok" ]]; then - if [[ "${automode}" == "1" ]]; then + if [[ "${install}" == "yes" ]]; then return 0 fi until dsks_submn; do : ; done @@ -2273,7 +2279,7 @@ Enter a name: " ########################################################################################### instl (){ - install="1" + install="yes" if [[ -z "${SETLOCALE}" ]]; then sleep 0.5 @@ -2351,6 +2357,30 @@ instl (){ until slct_dsktp; do : ; done fi + if [[ -z "${efi_entr_del}" ]]; then + sleep 0.5 + RED " + + + + [!] Please complete 'EFI Boot Entries Deletion' to continue + + " + until boot_entr; do : ; done + fi + + if [[ -z "${wrlss_rgd}" ]]; then + sleep 0.5 + RED " + + + + [!] Please complete 'Wireless Regulatory Domain Setup' to continue + + " + until wireless_rgd; do : ; done + fi + if [[ "${sanity}" != "ok" ]]; then sleep 0.5 RED " @@ -2464,7 +2494,6 @@ Enter a Mode number: " ########################################################################################### auto_mode (){ - automode="1" sleep 0.5 YELLOW " @@ -2621,7 +2650,6 @@ auto_mode (){ ask_homepart_form fi fi - automode="0" } ########################################################################################### manual_mode (){ @@ -2786,59 +2814,55 @@ Enter a partition number ${bwhite}(empty to skip and proceed)${blue}: " invalid return 1 fi - fi - done - skip - -#------------------------------------------------------------------------------------------ - -if [[ -n "${form_root_nmbr}" ]]; then - - rootpartname=" " - - while [[ -n "${rootpartname}" ]]; do - - sleep 0.5 - YELLOW " + YELLOW " > Label the "${roottype}" partition " - BLUE " + BLUE " Enter a name ${bwhite}(empty to skip and proceed)${blue}: " - read -p " + read -p " ==> " rootpartname - if [[ -n "${rootpartname}" ]]; then - if [[ "${fs}" == "1" ]]; then - e2label "${rootpart}" "${rootpartname}" - elif [[ "${fs}" == "2" ]]; then - mount "${rootpart}" /mnt && - btrfs filesystem label /mnt "${rootpartname}" && - umount /mnt - fi + if [[ -n "${rootpartname}" ]]; then - if [[ "$?" -eq 0 ]]; then - sleep 0.5 - NC " + if [[ "${fs}" == "1" ]]; then + e2label "${rootpart}" "${rootpartname}" + elif [[ "${fs}" == "2" ]]; then + mount "${rootpart}" /mnt && + btrfs filesystem label /mnt "${rootpartname}" && + umount /mnt + fi + + if [[ "$?" -eq 0 ]]; then + sleep 0.5 + NC " ==> [${green}Label "${roottype}" OK${nc}] " - return 0 - else - err_try - until disk_mngr; do : ; done - until form_root; do : ; done - return 0 + return 0 + else + err_try + until disk_mngr; do : ; done + until form_root; do : ; done + return 0 + fi fi + + skip + NC " + +==> [${green}Label "${roottype}" OK${nc}] " + return 0 + else + skip + NC " + + +==> [${green}Format "${roottype}" OK${nc}] " + return 0 fi - - skip - NC " - -==> [${green}Label "${roottype}" OK${nc}] " done -fi } ########################################################################################### ask_homepart_form (){ @@ -3218,12 +3242,17 @@ ${purple}###${nc} Unmount Filesystems ${purple}###${nc} ########################################################################################### revise (){ + revision="yes" + until slct_krnl; do : ; done until ask_bootldr; do : ; done until ask_fs; do : ; done until ask_swap; do : ; done until dtct_vga; do : ; done until slct_dsktp; do : ; done + until boot_entr; do : ; done + until wireless_rgd; do : ; done + until disk_mngr; do : ; done until instl_dsk; do : ; done until ask_crypt; do : ; done if [[ "${swapmode}" == "1" ]]; then @@ -3231,7 +3260,6 @@ revise (){ fi until set_mode; do : ; done until confirm_status; do : ; done - return 0 } ########################################################################################### sec_erase (){ @@ -3633,8 +3661,11 @@ ${purple}###${nc} Pacstrap System ${purple}###${nc} displaymanager="sddm" bluetooth="bluetooth" network="NetworkManager" ;; - 2) + + 2) # NOTE: Plasma & Systemd-boot & Wayland (System Optimized) Packages: + deskpkgs=""${basepkgs}" alsa-firmware alsa-utils arj ark bluedevil breeze-gtk ccache cups-pdf cups-pk-helper dolphin-plugins e2fsprogs efibootmgr exfatprogs fdkaac ffmpegthumbs firefox git glibc-locales gst-libav gst-plugin-libcamera gst-plugin-msdk gst-plugin-opencv gst-plugin-pipewire gst-plugin-qmlgl gst-plugin-va gst-plugin-wpe gst-plugins-ugly gstreamer-vaapi htop icoutils ipp-usb kamera kamoso kate kcalc kde-gtk-config kdegraphics-mobipocket kdegraphics-thumbnailers kdenetwork-filesharing kdeplasma-addons kdesdk-kio kdesdk-thumbnailers kdialog keditbookmarks kget kimageformats5 kinit kio-admin kio-gdrive kio-zeroconf kompare konsole kscreen kvantum kwrited latte-dock libappimage libfido2 libktorrent libmms libnfs libva-utils lirc lrzip lua52-socket lzop mac man-db man-pages mesa-demos mesa-utils nano-syntax-highlighting nss-mdns ntfs-3g okular opus-tools p7zip packagekit-qt5 pacman-contrib partitionmanager pdfmixtool pigz pipewire-alsa pipewire-pulse pkgstats plasma-browser-integration plasma-desktop plasma-disks plasma-firewall plasma-nm plasma-pa plasma-wayland-protocols plasma-wayland-session power-profiles-daemon powerdevil powerline powerline-fonts print-manager python-pyqt5 python-reportlab qbittorrent qt5-feedback qt5-imageformats qt5-virtualkeyboard qt5-xmlpatterns realtime-privileges reflector rng-tools sddm-kcm skanlite sof-firmware sox spectacle sshfs system-config-printer terminus-font timidity++ ttf-ubuntu-font-family ufw-extras unarchiver unrar unzip usb_modeswitch usbutils vdpauinfo vlc vorbis-tools vorbisgain wget xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-kde xsane zip zsh zsh-autosuggestions zsh-completions zsh-syntax-highlighting "${nrg_plc}"" ;; + 3) deskpkgs=""${basepkgs}" gnome networkmanager" displaymanager="gdm" @@ -3891,6 +3922,8 @@ ${purple}###${nc} Chroot & Configure System ${purple}###${nc} #------------------------------------------------------------------------------------------ + # NOTE: Vanilla Desktops Basic Configuration + if [[ "${packages}" =~ ^(1|3|4|5|6|7|8|9|10)$ ]]; then arch-chroot /mnt <<-SYSTEM @@ -4006,6 +4039,8 @@ NVIDIAHOOK #------------------------------------------------------------------------------------------ + # NOTE: Plasma & Systemd-boot & Wayland (System Optimized) Extended Configuration + if [[ "${packages}" == "2" ]]; then if [[ -n "${nrg_plc}" ]]; then @@ -4184,6 +4219,8 @@ NVIDIAHOOK #------------------------------------------------------------------------------------------ + # NOTE: Custom System Basic Configuration (Add any extra/your own configuration below, if so desired ) + if [[ "${packages}" == "11" ]]; then arch-chroot /mnt <<-CUSTOM sed -i "/^#${SETLOCALE}/s/^#//" /etc/locale.gen && @@ -4288,9 +4325,6 @@ NVIDIAHOOK tty="$(tty)" disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)" - if [[ -e /run/archiso/cowspace ]]; then - mount -o remount,size="80%" /run/archiso/cowspace - fi first_check sleep 1 CYAN " @@ -4306,14 +4340,10 @@ NVIDIAHOOK ********************************* - " - read -s -p " > Hit 'Enter' to Proceed < " installation - NC " - " - if [[ -n "${installation}" ]]; then - abort - fi + + ${bwhite}Press any key to start" + read -s -n 1 uefi_check upd_clock dtct_microcode