diff --git a/DotFiles/.zshrc b/DotFiles/.zshrc index 758ccbe..44f4271 100644 --- a/DotFiles/.zshrc +++ b/DotFiles/.zshrc @@ -108,7 +108,6 @@ alias brewit="Brewit.sh" # Update Homebrew alias brewdep="clear; brew deps --formula --installed" # List Dependencies alias brewdocm="Brewdocm.sh" # Brew Doctor alias brewtap="clear; brew tap" # List All Taps -alias brewauh="clear; brew autoupdate --help | more" # Homebrew Autoupdate Help # Main Menu Commands alias mm="Mm.sh" # Main Menu - All Menus diff --git a/ShellScripts/Brewautom.sh b/ShellScripts/Brewautom.sh new file mode 100755 index 0000000..15d5de6 --- /dev/null +++ b/ShellScripts/Brewautom.sh @@ -0,0 +1,86 @@ +#!/bin/zsh + +# Trap Ctl-C and Require a Menu Selection to Exit Script +trap 'echo -e "\nCtrl-C will not terminate $0."' INT + +function autoupdatestart { + clear + echo "Starting Brew Autoupdate..." + echo + brew autoupdate start --upgrade --greedy --cleanup --enable-notification --immediate +} + +function autoupdatestatus { + clear + echo "Brew Autoupdate Status..." + echo + brew autoupdate status +} + +function autoupdatestop { + clear + echo "Brew Autoupdate Stop..." + echo + brew autoupdate stop +} + +function autoupdatedelete { + clear + echo "Brew Autoupdate Delete..." + echo + brew autoupdate delete +} + +function autoupdatehelp { + clear + echo "Brew Autoupdate Help..." + echo + brew autoupdate --help | more +} + +function menu { + clear + echo + echo -e "\t\t\tBrew Autoupdate Menu\n" + echo -e "\t1. Start Autoupdate" + echo -e "\t2. Autoupdate Status" + echo -e "\t3. Stop Autoupdate" + echo -e "\t4. Delete Autoupdate" + echo -e "\t5. Autoupdate Help" + echo -e "\t0. Exit Menu\n\n" + echo -en "\t\tEnter an Option: " + read -k 1 option +} + +while [ 1 ] +do + menu + case $option in + 0) + break ;; + 1) + autoupdatestart ;; + + 2) + autoupdatestatus ;; + + 3) + autoupdatestop ;; + + 4) + autoupdatedelete ;; + + 5) + autoupdatehelp ;; + + *) + clear + echo "Sorry, wrong selection";; + esac + echo -en "\n\n\t\t\tHit any key to continue" + read -k 1 line +done +clear + +# Reset Trap Ctl-C +trap INT diff --git a/ShellScripts/Brewm.sh b/ShellScripts/Brewm.sh index 2beb779..0f762d7 100755 --- a/ShellScripts/Brewm.sh +++ b/ShellScripts/Brewm.sh @@ -59,6 +59,11 @@ function brewdocm { brewdocm.sh } +function brewautom { + clear + brewautom.sh +} + function mvexplore { clear mvexplore.sh @@ -75,7 +80,8 @@ function menu { echo -e "\t5. Brew App Listing" echo -e "\t6. Brew Taps" echo -e "\t7. Brew Doctor" - echo -e "\t8. MacVim Explore" + echo -e "\t8. Brew Autoupdate" + echo -e "\t9. MacVim Explore" echo -e "\t0. Exit Menu\n\n" echo -en "\t\tEnter an Option: " read -k 1 option @@ -110,6 +116,9 @@ do brewdocm;; 8) + brewautom;; + + 9) mvexplore;; *)