[BLU R1 HD ROMs, Kernels, Recoveries, & Other Devel] mrmazak:
Thanks.

I have found that the "while" and "do" are probably best choice for making a G.U.I. type screen. I was going to study rootjunkies "AmazonFire5thGenSuperTool" files to get a better idea on the format.

#!/bin/bash
# Bash Menu Script Example
chmod +x files/adblinux
chmod +x files/fastbootlinux
chmod a+x 3-Amazon-Fire-5th-gen-linux-mac.sh
# Amazon Fire 5th gen 7in tablet Utility for Linux and OSX
# RootJunky.com
# Lets check what platform we are running on
# We will check what we are running on and then set some variables for some funtimes
function platform
{ platform=`uname`
if [ $(uname -p) = 'powerpc' ]; then
echo "[-] PowerPC is not supported."
exit 1
fi

if [ "$platform" = 'Darwin' ]; then
ADB="files/./adbosx"
FASTBOOT="files/./fastbootosx"
version="OS X"
else
ADB="files/./adblinux"
FASTBOOT="files/./fastbootlinux"
version="Linux"

fi
}

platform

echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
echo " ___ ____ ____ _____ ____ ___ ____ ____ __ ________ _ _ "
echo " / _ \/ _ \/ _ \/_ _/_ / / / / / \/ / //_/\ \/ / / __/ _ \/ \/ \ "
echo " / , _/ |_| / |_| / / / / // / /_/ / / < \ /_/ /_/ |_| / , , \ "
echo " /_/|_|\____/\____/ /_/ \___/\____/_/\_/_/\_/ /_/_/___/\____/_/ \/ \_\ "
echo " "
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
echo "[*] RootJunkys"
echo "[*] Amazon Fire 5th gen tablet supertool Fire OS 5.1.2"
echo "[*] Linux / OSX Version"
echo "[*] Remember to chmod +x this script"
echo "[*] NOTE If you are on Fire OS 5.1.4, 5.1.3, or 5.1.2.1 you need to downgrade"
echo "[*] your device firmware by adb sideloading 5.1.2 firmware from Amazon"
echo "[*] YOUTUBE VIDEO Tutorial https://youtu.be/RQLoH-ahjy4"
echo "----------------------------------------------------------------------------"
PS3='Please enter your choice number: '
options=("Google Play Store 1" "Root Device 2" "Block OTA Updates 3" "Remove Lock Screen Ads 4" "Nova Launcher Install 5" "FlashFire App Install 6" "Xposed Framework Install 7" "Quit 8")
select opt in "${options[@]}"
do
case $opt in
"Google Play Store 1")
echo "--------------------------------------------------------------------------------"
echo "[*] First you must turn on ADB DEBUGGING in your Amazon fire 5th gen settings"
echo "[*] go to device options then click on serial number 7 times to enable"
echo "[*] developer options then in developer options turn on Enable adb option."
echo "[*] This script will install Google Play Store on your Amazon Fire 5th gen"
echo "[*] 7in tablet enjoy"
echo "--------------------------------------------------------------------------------"
echo "press enter to continue"
read \n
sudo $ADB kill-server
sudo $ADB start-server
echo "[*] Installing Google Play Store apps this will take some time"
echo "--------------------------------------------------------------------------------"
echo "[*] Installing app 1 of 4"
sudo $ADB install -r apps/com.google.android.gms-6.6.03-6603036-minAPI9.apk
echo "--------------------------------------------------------------------------------"
echo "[*] Installing app 2 of 4"
sudo $ADB install -r apps/GoogleLoginService.apk
echo "--------------------------------------------------------------------------------"
echo "[*] Installing app 3 of 4"
sudo $ADB install -r apps/GoogleServicesFramework.apk
sudo $ADB shell pm grant com.google.android.gms android.permission.INTERACT_ACROSS_USERS
echo "--------------------------------------------------------------------------------"
echo "[*] Installing app 4 of 4"
sudo $ADB install -r apps/com.android.vending-5.9.12-80391200-minAPI9.apk
echo "[*] all apps installed and permissions set."
echo "[*] please reboot device to finish the process then sign into Play store"
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to exit RootJunky OUT"
read \n
sudo $ADB kill-server
bash 3-Amazon-Fire-5th-gen-linux-mac.sh
exit
;;
"Root Device 2")
echo "--------------------------------------------------------------------------------"
echo "[*] First you must turn on ADB DEBUGGING in your Amazon fire 5th gen settings"
echo "[*] go to device options then click on serial number 7 times to enable "
echo "[*] developer options then in developer options turn on Enable adb option."
echo "[*] this tool will boot you into fastboot and root your device."
echo "[*] device will reboot a couple times during this process."
echo "--------------------------------------------------------------------------------"
echo "[*] Press enter to continue"
read \n
sudo $ADB kill-server
sudo $ADB start-server
echo "--------------------------------------------------------------------------------"
echo "[*] Make sure USB Debugging is enabled on your tablet"
echo "[*] This script will install kingroot to get root access then "
echo "[*] replace it with superSU app. "
echo "--------------------------------------------------------------------------------"
echo "[*] Press enter to continue"
read \n
echo "[*] installing Kingroot app now"
sudo $ADB install -r apps/Kingroot.apk
echo "[*] app installed"
echo "--------------------------------------------------------------------------------"
echo "[*] open kingroot app on the Amazon Fire tablet then try and get root"
echo "[*] access. The device may reboot and try a couple times."
echo "[*] If it fails just reboot the device then open kingroot and try again."
echo "[*] try unplugging it from your computer and running kingroot app that way."
echo "[*] press and key to remove kingroot and install supersu once"
echo "[*] kingroot has working root access. "
echo "--------------------------------------------------------------------------------"
echo "[*] Press enter to continue"
read \n
echo "[*] pushing files to the device"
sudo $ADB push apps/mrw /sdcard/mrw
echo "[*] please grant root access on your device to ADB shell"
sudo $ADB shell su -c "chmod 777 /cache"
sudo $ADB shell su -c "chmod 777 /cache"
sudo $ADB shell su -c "sh /sdcard/mrw/root.sh"
echo "--------------------------------------------------------------------------------"
echo "[*] once supersu app opens click conitnue"
echo "[*] then click normal "
echo "[*] and finally click ok"
echo "[*] last click no thanks and you have supersu install"
echo "[*] close supersu app and uninstall any kingroot or purify apps"
echo "[*] left on the device."
echo "--------------------------------------------------------------------------------"
echo "[*] Press enter to continue"
read \n
echo "[*] rebooting device now"
echo "--------------------------------------------------------------------------------"
sudo $ADB reboot
echo "--------------------------------------------------------------------------------"
echo "[*] process finished now just wait for your device to fully boot up"
echo "[*] this will take some time if you are on the Optimizing system screen."
echo "[*] NOTE now that you have root please block ota updates"
echo "[*] so that you can keep it safe."
echo "--------------------------------------------------------------------------------"
echo "[*] ROOTJUNKY OUT"
echo "press enter to exit"
read \n
sudo $ADB kill-server
bash 3-Amazon-Fire-5th-gen-linux-mac.sh
exit
;;
"Block OTA Updates 3")
echo "--------------------------------------------------------------------------------"
echo "root access is required for this to work."
echo "First you must turn on ADB DEBUGGING in your Amazon fire 5th gen settings"
echo "go to device options then click on serial number 7 times to enable "
echo "developer options then in developer options turn on Enable adb option."
echo "it is recommended to block ota updates to protect root access."
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to continue"
read \n
sudo $ADB kill-server
sudo $ADB start-server
echo "--------------------------------------------------------------------------------"
echo "[*] grant root access on your device to adb shell"
echo "--------------------------------------------------------------------------------"
sudo $ADB shell su -c "chmod 777 /cache"
echo "[*] press enter to continue"
read \n
sudo $ADB shell su -c "mount -o remount,rw /system"
sudo $ADB shell su -c "rm -r /system/app/otaverifier"
sudo $ADB shell su -c "rm -r /system/priv-app/DeviceSoftwareOTA"
sudo $ADB shell su -c "rm -r /system/priv-app/SystemUpdatesUI"
echo "--------------------------------------------------------------------------------"
echo "[*] OTA update have now been blocked"
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to exit RootJunky OUT"
read \n
sudo $ADB kill-server
bash 3-Amazon-Fire-5th-gen-linux-mac.sh
exit
;;
"Remove Lock Screen Ads 4")
echo "--------------------------------------------------------------------------------"
echo "[*] First you must turn on ADB DEBUGGING in your Amazon fire 5th gen settings"
echo "[*] go to device options then click on serial number 7 times to enable "
echo "[*] developer options then in developer options turn on Enable adb option."
echo "[*] this will remove ads from your lock screen."
echo "--------------------------------------------------------------------------------"
echo "[*] Press enter to continue"
read \n
sudo $ADB kill-server
sudo $ADB start-server
echo "--------------------------------------------------------------------------------"
echo "[*] grant root access on your device to adb shell"
echo "--------------------------------------------------------------------------------"
sudo $ADB shell su -c "chmod 777 /cache"
echo "[*] press enter to continue"
read \n
sudo $ADB shell su -c "mount -o remount,rw /system"
echo "[*]Removing ads now"
sudo $ADB shell su -c "rm -r /system/priv-app/com.amazon.kindle.kso"
echo "--------------------------------------------------------------------------------"
echo "[*] device will now reboot to finish removal of ads"
echo "--------------------------------------------------------------------------------"
sudo $ADB reboot
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to exit RootJunky OUT"
read \n
sudo $ADB kill-server
bash 3-Amazon-Fire-5th-gen-linux-mac.sh
exit
;;
"Nova Launcher Install 5")
echo "--------------------------------------------------------------------------------"
echo "[*] First you must turn on ADB DEBUGGING in your Amazon fire 5th gen settings"
echo "[*] go to device options then click on serial number 7 times to enable "
echo "[*] developer options then in developer options turn on Enable adb option."
echo "[*] this will install Nova Launcher and delete the stock launcher"
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to continue"
read \n
sudo $ADB kill-server
sudo $ADB start-server
echo "--------------------------------------------------------------------------------"
echo "[*] please grant root access on your device to ADB shell"
sudo $ADB shell su -c "chmod 777 /cache"
echo "[*] press enter to continue"
read \n
sudo $ADB shell su -c "mount -o remount,rw /system"
echo "--------------------------------------------------------------------------------"
echo "[*] Installing Nova Launcher"
echo "--------------------------------------------------------------------------------"
sudo $ADB install -r apps/NovaLauncher_4.2.0.apk
sudo $ADB shell su -c "cp /system/priv-app/com.amazon.firelauncher/com.amazon.firelauncher.apk /sdcard/com.amazon.firelauncher.apk"
sudo $ADB shell su -c "rm /system/priv-app/com.amazon.firelauncher/com.amazon.firelauncher.apk"
echo "--------------------------------------------------------------------------------"
echo "[*] Stock Amazon launcher has been backed up to your sdcard."
echo "[*] Nova Launcher is Installed device will reboot to finish."
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to continue"
read \n
sudo $ADB reboot
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to exit RootJunky OUT"
read \n
sudo $ADB kill-server
bash 3-Amazon-Fire-5th-gen-linux-mac.sh
exit
;;
"FlashFire App Install 6")
echo "--------------------------------------------------------------------------------"
echo "This Option will install Flash Fire app on your tablet"
echo "First you must turn on ADB DEBUGGING in your Amazon fire 5th gen settings"
echo "go to device options then click on serial number 7 times to enable "
echo "developer options then in developer options turn on Enable adb option."
echo "--------------------------------------------------------------------------------"
echo "[*] press enter key to start"
read \n
sudo $ADB kill-server
sudo $ADB start-server
echo "[*] Installing FlashFire app this will take some time"
echo "--------------------------------------------------------------------------------"
sudo $ADB install -r apps/FlashFire-v0.50.apk
echo "--------------------------------------------------------------------------------"
echo "[*] FlashFire Installed check your Apps on the device"
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to exit RootJunky OUT"
read \n
sudo $ADB kill-server
bash 3-Amazon-Fire-5th-gen-linux-mac.sh
exit
;;
"Xposed Framework Install 7")
echo "--------------------------------------------------------------------------------"
echo "[*] First you must turn on ADB DEBUGGING in your Amazon fire 5th gen settings"
echo "[*] go to device options then click on serial number 7 times to enable "
echo "[*] developer options then in developer options turn on Enable adb option."
echo "[*] this will install xposed framework on your device"
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to continue"
read \n
sudo $ADB kill-server
sudo $ADB start-server
echo "--------------------------------------------------------------------------------"
echo "[*] Installing FlashFire app this will take some time which is need to"
echo "[*] get xposed fully installed and working right."
echo "--------------------------------------------------------------------------------"
echo "[*] Installing app"
sudo $ADB install -r apps/FlashFire-v0.50.apk
echo "--------------------------------------------------------------------------------"
echo "[*] FlashFire Installed check your Apps on the device."
echo "--------------------------------------------------------------------------------"
echo "[*] installing xposed app on the device now"
sudo $ADB install -r apps/XposedInstaller_3.0_alpha4.apk
echo "--------------------------------------------------------------------------------"
echo "[*] xposed app install but it will not work until the framework is flashed"
echo "[*] with flashfire app. "
echo "--------------------------------------------------------------------------------"
echo "[*] pushing xposed-v80-sdk22-arm.zip framework to the device."
echo "--------------------------------------------------------------------------------"
sudo $ADB push apps/xposed-v80-sdk22-arm.zip /sdcard/
echo "--------------------------------------------------------------------------------"
sudo $ADB shell am start -n eu.chainfire.flash/eu.chainfire.flash.ui.activity.MainActivity
echo "--------------------------------------------------------------------------------"
echo "[*] Flash Fire app should start once it is granted root access please"
echo "[*] click the plus circle in the bottom right corn"
echo "[*] press flash zip or ota. Now scroll all the way to the bottom "
echo "[*] and select xposed-v80-sdk22-arm.zip."
echo "[*] make sure mount system Read write is check then click the check on the "
echo "[*] top right. Next press the flash button and hit ok to the warning box. "
echo "[*] the device will flash the file and then reboot to finish the install."
echo "--------------------------------------------------------------------------------"
sudo $ADB kill-server
echo "[*] Note boot up will take about 10 minutes just relax and wait."
echo "[*] Xposed framework will be fully working after reboot."
echo "--------------------------------------------------------------------------------"
echo "[*] press enter to exit RootJunky OUT"
read \n
sudo $ADB kill-server
bash 3-Amazon-Fire-5th-gen-linux-mac.sh
exit
;;
"Quit 8")
exit
;;
*) echo invalid option;;
esac
done

The tool has already grown from the original 4 or 5 functions to now I am looping number 12. And still thinking of things to add.

V4 is in the text editor now and I am proof reading the function loops.

So I am falling behind on the linux side for sure, and appreciate your offer to help.

Thank You