helpmsg="Need further help? You can either join the Wii Mini Hacking Discord server (recommended) at https://discord.gg/6ryxnkS, the RiiConnect24 Discord server at https://discord.gg/b4Y7jfD or you can send an e-mail to support@riiconnect24.net and we'll try to assist. "
printf"Hello $USER, and welcome to the BlueBomb helper script.\n\nThis script will automatically check you have an environment capable of utilizing BlueBomb, download required files, and automate things as much as possible to make it easier for you, the end user, to perform the BlueBomb exploit on your Wii or Wii Mini console.\n\n"| fold -s -w $(tput cols)
#set variable $sudo if the user is not root, so sudo is only used if absolutely needed
"Checking prerequisites - Internet connection"|"Download and extract BlueBomb")printf"* NOTE:\n\t* Please ensure that your PC has an active internet connection capable of reaching github.com.\n\n"| fold -s -w $(tput cols);;
"Execute BlueBomb")printf"* TROUBLESHOOTING NOTES:\n\t* If you get an error about the address/socket being already in use, try manually disabling the Bluetooth service on your PC. For systemd users, you would run 'sudo systemctl disable --now bluetooth.service', and for OpenRC users, you would run 'sudo rc-service bluetooth stop'.\n\t* If you get an error about the device failing to be powered on, try running the script as root.\n\n"| fold -s -w $(tput cols);;
[[ -n $pm]]&&printf"\n* $i is missing! Attempting to install using detected package manager (you may be prompted for your password)...\n"| fold -s -w $(tput cols)&&$sudo0$pm$(indep $i)|| ex "\n* $i is missing! Please install it using your preferred package manager.\n\n$helpmsg\n"
printf"What is the console type?\n\nOPTIONS:\n\t[1]: Wii\n\t[2]: Wii Mini\n\nPlease type your selection and then press ENTER: "| fold -s -w $(tput cols)
printf"What is the region of your Wii Mini console?\n\nOPTIONS:\n\t[1]: USA\n\t[2]: PAL\n\nPlease type your selection and then press ENTER: "| fold -s -w $(tput cols)
printf"What is the system menu version of your Wii Console?\n\nIf you're not sure where to find this, follow the following instructions:\n\nFrom the Wii Menu, launch Wii Options (round button in the bottom left), and then launch Wii Settings. On the first page of the Wii Settings at the upper right corner, you should see 'Ver X.YZ'. Where 'X' and 'Y' are numbers, and 'Z' is a letter. An example is '4.3E'. This is your system menu version.\n\nPlease enter the system menu version and then press ENTER: "