Verified Commit a228b1f3 authored by test123's avatar test123
Browse files

changed format of ronin upgrade, added indication of completion, removed...

changed format of ronin upgrade, added indication of completion, removed redundant code from ronin main menu
parent 07d8e4c5
......@@ -50,21 +50,38 @@ case $CHOICE in
# uses passwd to unlock root user, returns to menu
;;
3)
sudo rm -f ~/ronin-update.sh
# using -f here to avoid error output if ~/ronin-update.sh does not exist
echo -e "${RED}"
echo "***"
echo "Upgrading Ronin..."
echo "***"
echo -e "${NC}"
sleep 2s
echo "sudo rm -rf ~/RoninDojo" > ~/ronin-update.sh
echo "sudo rm -rf /usr/local/bin/ronin" > ~/ronin-update.sh
echo "sudo rm -rf /usr/local/bin/ronin" >> ~/ronin-update.sh
echo "cd ~" >> ~/ronin-update.sh
echo "git clone https://github.com/RoninDojo/RoninDojo.git" >> ~/ronin-update.sh
echo "sudo cp ~/RoninDojo/ronin /usr/local/bin"
echo "sudo cp -rv ~/RoninDojo/ronin /usr/local/bin" >> ~/ronin-update.sh
# removes RoninDojo directory and ronin main menu script
# changes to home directory, clones RoninDojo master branch, and copies new ronin menu to /user/local/bin
echo "echo -e '${RED}'" >> ~/ronin-update.sh
echo "echo '***'" >> ~/ronin-update.sh
echo "echo "Upgrade Complete!"" >> ~/ronin-update.sh
echo "echo '***'" >> ~/ronin-update.sh
echo "echo -e '${NC}'" >> ~/ronin-update.sh
# notifies upgrade is complete
echo "sleep 2s" >> ~/ronin-update.sh
echo "bash ~/RoninDojo/Scripts/Menu/menu-system2.sh" >> ~/ronin-update.sh
sudo chmod +x ~/ronin-update.sh
bash ~/ronin-update.sh
# returns to menu
# makes script executable and runs
# end of script returns to menu
# script is deleted during next run of update
;;
4)
bash ~/RoninDojo/Scripts/Install/install-mount-backup-data-drive.sh
......
......@@ -8,9 +8,6 @@ NC='\033[0m'
cp ~/RoninDojo/Scripts/.dialogrc ~/.dialogrc
# config file for dialog color
rm -f ~/ronin-update.sh
# removes ronin-update script if found, will not output error if not found which keeps things clean
HEIGHT=22
WIDTH=76
CHOICE_HEIGHT=16
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment