mirror of
https://gitlab.com/thebiblelover7/dotfiles.git
synced 2025-09-13 15:13:49 +00:00
added my scripts and added them to the install script
This commit is contained in:
74
scripts/arch-install
Executable file
74
scripts/arch-install
Executable file
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
|
||||
# |||||- Pre-Configurations -|||||
|
||||
|
||||
diselect() {
|
||||
PS3='Please enter your choice: '
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
1|"${options[0]}")
|
||||
${option_c[0]}
|
||||
break
|
||||
;;
|
||||
2|"${options[1]}")
|
||||
${option_c[1]}
|
||||
break
|
||||
;;
|
||||
3|"${options[2]}")
|
||||
${option_c[2]}
|
||||
break
|
||||
;;
|
||||
4|"${options[3]}")
|
||||
${option_c[3]}
|
||||
break
|
||||
;;
|
||||
5|"${options[4]}")
|
||||
${option_c[4]}
|
||||
break
|
||||
;;
|
||||
*) echo "invalid option, try again" ;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
# |||||- Functions -|||||
|
||||
|
||||
check_internet() {
|
||||
ping -c 2 archlinux.org && check_intenet_state=true || check_intenet_state=false
|
||||
if [[ $check_intenet_state = false ]]
|
||||
then
|
||||
echo "No internet.. Exiting..."
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
update_time() {
|
||||
timedatectl set-ntp true
|
||||
}
|
||||
|
||||
dialog_partition_disks() {
|
||||
options=("cfdisk" "fdisk" "I already partitioned my disks")
|
||||
option_c=("fun_cfdisk" "fun_fdisk" "echo")
|
||||
diselect
|
||||
}
|
||||
|
||||
dialog_drive_list() {
|
||||
echo "Please enter your drive to be partitioned in the format '/dev/sda'"
|
||||
read -p "-> " var_drive
|
||||
|
||||
}
|
||||
fun_cfdisk() {
|
||||
dialog_drive_list
|
||||
cfdisk $var_drive
|
||||
|
||||
}
|
||||
|
||||
|
||||
# |||||- Execution -|||||
|
||||
|
||||
check_internet
|
||||
|
||||
dialog_partition_disks
|
Reference in New Issue
Block a user