refactored setup script and added install option
This commit is contained in:
parent
5dbec4cc5a
commit
a9c78171fc
44
setup.sh
44
setup.sh
|
@ -10,12 +10,7 @@ startx_command="startlxqt"
|
|||
. ./connection.sh
|
||||
. ./user.sh
|
||||
|
||||
choice=""
|
||||
|
||||
clear
|
||||
echo "=== Welcome to Tildelinux! ==="
|
||||
configure_network
|
||||
|
||||
setup_tildelinux() {
|
||||
echo "What tilde would you like to connect to? (use the domain name as you would for ssh)"
|
||||
read tilde_name
|
||||
|
||||
|
@ -56,3 +51,40 @@ echo "User configured!"
|
|||
echo "All done! Enjoy using Tildelinux!"
|
||||
rm ./setup_incomplete
|
||||
systemctl restart 'getty@tty1.service'
|
||||
}
|
||||
|
||||
choose_option() {
|
||||
answers="1 2"
|
||||
answer=""
|
||||
|
||||
|
||||
echo "What would you like to do?"
|
||||
echo "1. Configure Tildelinux for use as a live system"
|
||||
echo "2. Install Tildelinux to a disk"
|
||||
read -r answer
|
||||
|
||||
if is_substring "$answer" "$answers"
|
||||
then
|
||||
case "$answer" in
|
||||
"1")
|
||||
setup_tildelinux
|
||||
;;
|
||||
"2")
|
||||
startx
|
||||
;;
|
||||
else
|
||||
echo "\"$answer\" is not a valid option."
|
||||
choose_option
|
||||
fi
|
||||
}
|
||||
|
||||
clear
|
||||
echo "=== Welcome to Tildelinux! ==="
|
||||
configure_network
|
||||
|
||||
if [ -f ./setup_incomplete ]
|
||||
then
|
||||
choose_option
|
||||
else
|
||||
setup_tildelinux
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue