Browse Source

tabs and line jump

pull/1255/head
UltimateByte 8 years ago
committed by GitHub
parent
commit
b8fc80443e
  1. 23
      lgsm/functions/command_mods_remove.sh

23
lgsm/functions/command_mods_remove.sh

@ -36,22 +36,23 @@ fn_mods_remove_init(){
echo -e " * \e[36m$(sed "${installedmodsline}q;d" "${modslockfilefullpath}")\e[0m" echo -e " * \e[36m$(sed "${installedmodsline}q;d" "${modslockfilefullpath}")\e[0m"
let installedmodsline=installedmodsline+1 let installedmodsline=installedmodsline+1
done done
sleep 2 echo ""
sleep 1
# Keep prompting as long as the user input doesn't correspond to an available mod # Keep prompting as long as the user input doesn't correspond to an available mod
while [[ ! " ${availablemodsremove[@]} " =~ " ${usermodselect} " ]]; do while [[ ! " ${availablemodsremove[@]} " =~ " ${usermodselect} " ]]; do
echo -en "Enter a \e[36mmod\e[0m to \e[31mremove\e[0m (or exit to abort): " echo -en "Enter a \e[36mmod\e[0m to \e[31mremove\e[0m (or exit to abort): "
read -r usermodselect read -r usermodselect
# Exit if user says exit or abort # Exit if user says exit or abort
if [ "${usermodselect}" == "exit" ]||[ "${usermodselect}" == "abort" ]; then if [ "${usermodselect}" == "exit" ]||[ "${usermodselect}" == "abort" ]; then
fn_script_log "User aborted." fn_script_log "User aborted."
echo "Aborted." echo "Aborted."
core_exit.sh core_exit.sh
# Supplementary output upon invalid user input # Supplementary output upon invalid user input
elif [[ ! " ${availablemodsremove[@]} " =~ " ${usermodselect} " ]]; then elif [[ ! " ${availablemodsremove[@]} " =~ " ${usermodselect} " ]]; then
fn_print_error2_nl "${usermodselect} is not a valid mod." fn_print_error2_nl "${usermodselect} is not a valid mod."
echo " * Enter a valid mod or input exit to abort." echo " * Enter a valid mod or input exit to abort."
fi fi
done done
# Gives a pretty name to the user and get all mod info # Gives a pretty name to the user and get all mod info
currentmod="${usermodselect}" currentmod="${usermodselect}"

Loading…
Cancel
Save