From 22c27b08c94f48612cb6c40d239d75a4a6b24e18 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Thu, 21 May 2020 20:44:21 -0500 Subject: [PATCH] Added update confirmation --- gravity-sync.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gravity-sync.sh b/gravity-sync.sh index 3750121..767e2ec 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -129,6 +129,7 @@ case $# in exit;; esac done + exit ;; version) @@ -138,9 +139,19 @@ case $# in ;; update) - echo -e "${PURPLE}Info:${NC} Update requested" - echo -e "This will fail unless you installed via Git" - git pull + + echo -e "${GREEN}Success:${NC} Update requested" + echo -e "This will function only if you installed with Git" + select yn in "Update" "Cancel"; do + case $yn in + Yes ) + git pull + break;; + No ) + echo "No changes have been made to the system" + exit;; + esac + done exit ;;