Update startup.sh
This commit is contained in:
parent
c58e725ca8
commit
4cce356634
|
|
@ -135,7 +135,7 @@ select_option() {
|
||||||
# @noargs
|
# @noargs
|
||||||
logo () {
|
logo () {
|
||||||
# This will be shown on every set as user is progressing
|
# This will be shown on every set as user is progressing
|
||||||
echo -ne "
|
echo "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||||
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
██╔══██╗██╔══██╗██╔════╝██║ ██║╚══██╔══╝██║╚══██╔══╝██║ ██║██╔════╝
|
||||||
|
|
@ -145,15 +145,13 @@ echo -ne "
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
Please select presetup settings for your system
|
Please select presetup settings for your system
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------"
|
||||||
"
|
|
||||||
}
|
}
|
||||||
# @description This function will handle file systems. At this movement we are handling only
|
# @description This function will handle file systems. At this movement we are handling only
|
||||||
# btrfs and ext4. Others will be added in future.
|
# btrfs and ext4. Others will be added in future.
|
||||||
filesystem () {
|
filesystem () {
|
||||||
echo -ne "
|
echo "
|
||||||
Please Select your file system for both boot and root
|
Please Select your file system for both boot and root"
|
||||||
"
|
|
||||||
options=("btrfs" "ext4" "luks" "exit")
|
options=("btrfs" "ext4" "luks" "exit")
|
||||||
select_option $? 1 "${options[@]}"
|
select_option $? 1 "${options[@]}"
|
||||||
|
|
||||||
|
|
@ -162,11 +160,10 @@ case $? in
|
||||||
1) set_option FS ext4;;
|
1) set_option FS ext4;;
|
||||||
2)
|
2)
|
||||||
while true; do
|
while true; do
|
||||||
echo -ne "Please enter your luks password: \n"
|
read -r -s -p "Please enter your luks password: " luks_password # read password without echo
|
||||||
read -s luks_password # read password without echo
|
echo
|
||||||
|
read -r -s -p "Please repeat your luks password: " luks_password2 # read password without echo
|
||||||
echo -ne "Please repeat your luks password: \n"
|
echo
|
||||||
read -s luks_password2 # read password without echo
|
|
||||||
|
|
||||||
if [ "$luks_password" = "$luks_password2" ]; then
|
if [ "$luks_password" = "$luks_password2" ]; then
|
||||||
set_option LUKS_PASSWORD $luks_password
|
set_option LUKS_PASSWORD $luks_password
|
||||||
|
|
@ -185,10 +182,9 @@ esac
|
||||||
timezone () {
|
timezone () {
|
||||||
# Added this from arch wiki https://wiki.archlinux.org/title/System_time
|
# Added this from arch wiki https://wiki.archlinux.org/title/System_time
|
||||||
time_zone="$(curl --fail https://ipapi.co/timezone)"
|
time_zone="$(curl --fail https://ipapi.co/timezone)"
|
||||||
echo -ne "
|
echo "
|
||||||
System detected your timezone to be '$time_zone' \n"
|
System detected your timezone to be '$time_zone' "
|
||||||
echo -ne "Is this correct?
|
echo "Is this correct?"
|
||||||
"
|
|
||||||
options=("Yes" "No")
|
options=("Yes" "No")
|
||||||
select_option $? 1 "${options[@]}"
|
select_option $? 1 "${options[@]}"
|
||||||
|
|
||||||
|
|
@ -197,8 +193,7 @@ case ${options[$?]} in
|
||||||
echo "${time_zone} set as timezone"
|
echo "${time_zone} set as timezone"
|
||||||
set_option TIMEZONE $time_zone;;
|
set_option TIMEZONE $time_zone;;
|
||||||
n|N|no|NO|No)
|
n|N|no|NO|No)
|
||||||
echo "Please enter your desired timezone e.g. Europe/London :"
|
read -p "Please enter your desired timezone e.g. Europe/London: " new_timezone
|
||||||
read new_timezone
|
|
||||||
echo "${new_timezone} set as timezone"
|
echo "${new_timezone} set as timezone"
|
||||||
set_option TIMEZONE $new_timezone;;
|
set_option TIMEZONE $new_timezone;;
|
||||||
*) echo "Wrong option. Try again";timezone;;
|
*) echo "Wrong option. Try again";timezone;;
|
||||||
|
|
@ -206,7 +201,7 @@ esac
|
||||||
}
|
}
|
||||||
# @description Set user's keyboard mapping.
|
# @description Set user's keyboard mapping.
|
||||||
keymap () {
|
keymap () {
|
||||||
echo -ne "
|
echo -n "
|
||||||
Please select a keyboard layout from this list"
|
Please select a keyboard layout from this list"
|
||||||
# These are default key maps as presented in official arch repo archinstall
|
# These are default key maps as presented in official arch repo archinstall
|
||||||
options=(us by ca cf cz de dk es et fa fi fr gr hu il it lt lv mk nl no pl ro ru sg ua uk)
|
options=(us by ca cf cz de dk es et fa fi fr gr hu il it lt lv mk nl no pl ro ru sg ua uk)
|
||||||
|
|
@ -214,15 +209,14 @@ options=(us by ca cf cz de dk es et fa fi fr gr hu il it lt lv mk nl no pl ro ru
|
||||||
select_option $? 4 "${options[@]}"
|
select_option $? 4 "${options[@]}"
|
||||||
keymap=${options[$?]}
|
keymap=${options[$?]}
|
||||||
|
|
||||||
echo -ne "Chosen keyboard layout: ${keymap} \n"
|
echo "Chosen keyboard layout: ${keymap} "
|
||||||
set_option KEYMAP $keymap
|
set_option KEYMAP $keymap
|
||||||
}
|
}
|
||||||
|
|
||||||
# @description Choose whether drive is SSD or not.
|
# @description Choose whether drive is SSD or not.
|
||||||
drivessd () {
|
drivessd () {
|
||||||
echo -ne "
|
echo "
|
||||||
Is this an ssd? yes/no:
|
Is this an ssd? yes/no:"
|
||||||
"
|
|
||||||
|
|
||||||
options=("Yes" "No")
|
options=("Yes" "No")
|
||||||
select_option $? 1 "${options[@]}"
|
select_option $? 1 "${options[@]}"
|
||||||
|
|
@ -238,14 +232,13 @@ esac
|
||||||
|
|
||||||
# @description Disk selection for drive to be used with installation.
|
# @description Disk selection for drive to be used with installation.
|
||||||
diskpart () {
|
diskpart () {
|
||||||
echo -ne "
|
echo -e "
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
THIS WILL FORMAT AND DELETE ALL DATA ON THE DISK
|
\e[1;31mTHIS WILL FORMAT AND DELETE ALL DATA ON THE DISK!\e[0m
|
||||||
Please make sure you know what you are doing because
|
Please make sure you know what you are doing because
|
||||||
after formating your disk there is no way to get data back
|
after formating your disk there is no way to get data back
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
" # \e[1;31m makes text bold and red, \e[0m reverts it to normal
|
||||||
"
|
|
||||||
|
|
||||||
PS3='
|
PS3='
|
||||||
Select the disk to install on: '
|
Select the disk to install on: '
|
||||||
|
|
@ -265,11 +258,10 @@ userinfo () {
|
||||||
read -p "Please enter your username: " username
|
read -p "Please enter your username: " username
|
||||||
set_option USERNAME ${username,,} # convert to lower case as in issue #109
|
set_option USERNAME ${username,,} # convert to lower case as in issue #109
|
||||||
while true; do
|
while true; do
|
||||||
echo -ne "Please enter your password: \n"
|
read -r -s -p "Please enter your password: " password # read password without echo
|
||||||
read -s password # read password without echo
|
echo
|
||||||
|
read -r -s -p "Please repeat your password: " password2 # read password without echo
|
||||||
echo -ne "Please repeat your password: \n"
|
echo
|
||||||
read -s password2 # read password without echo
|
|
||||||
|
|
||||||
if [ "$password" = "$password2" ]; then
|
if [ "$password" = "$password2" ]; then
|
||||||
set_option PASSWORD $password
|
set_option PASSWORD $password
|
||||||
|
|
@ -285,7 +277,7 @@ set_option NAME_OF_MACHINE $nameofmachine
|
||||||
# @description Choose AUR helper.
|
# @description Choose AUR helper.
|
||||||
aurhelper () {
|
aurhelper () {
|
||||||
# Let the user choose AUR helper from predefined list
|
# Let the user choose AUR helper from predefined list
|
||||||
echo -ne "Please enter your desired AUR helper:\n"
|
echo "Please enter your desired AUR helper:"
|
||||||
options=(paru yay picaur aura trizen pacaur none)
|
options=(paru yay picaur aura trizen pacaur none)
|
||||||
select_option $? 4 "${options[@]}"
|
select_option $? 4 "${options[@]}"
|
||||||
aur_helper=${options[$?]}
|
aur_helper=${options[$?]}
|
||||||
|
|
@ -295,7 +287,7 @@ aurhelper () {
|
||||||
# @description Choose Desktop Environment
|
# @description Choose Desktop Environment
|
||||||
desktopenv () {
|
desktopenv () {
|
||||||
# Let the user choose Desktop Enviroment from predefined list
|
# Let the user choose Desktop Enviroment from predefined list
|
||||||
echo -ne "Please select your desired Desktop Enviroment:\n"
|
echo "Please select your desired Desktop Enviroment:"
|
||||||
options=(gnome kde cinnamon xfce mate budgie lxde deepin openbox server)
|
options=(gnome kde cinnamon xfce mate budgie lxde deepin openbox server)
|
||||||
select_option $? 4 "${options[@]}"
|
select_option $? 4 "${options[@]}"
|
||||||
desktop_env=${options[$?]}
|
desktop_env=${options[$?]}
|
||||||
|
|
@ -304,9 +296,9 @@ desktopenv () {
|
||||||
|
|
||||||
# @description Choose whether to do full or minimal installation.
|
# @description Choose whether to do full or minimal installation.
|
||||||
installtype () {
|
installtype () {
|
||||||
echo -ne "Please select type of installation:\n\n
|
echo -e "Please select type of installation:\n\n
|
||||||
Full install: Installs full featured desktop enviroment, with added apps and themes needed for everyday use\n
|
Full install: Installs full featured desktop enviroment, with added apps and themes needed for everyday use\n
|
||||||
Minimal Install: Installs only apps few selected apps to get you started\n"
|
Minimal Install: Installs only apps few selected apps to get you started"
|
||||||
options=(FULL MINIMAL)
|
options=(FULL MINIMAL)
|
||||||
select_option $? 4 "${options[@]}"
|
select_option $? 4 "${options[@]}"
|
||||||
install_type=${options[$?]}
|
install_type=${options[$?]}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue