From b4007f89dce9fb5fb6e7f1f069a2c6482a31aaff Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Thu, 21 May 2020 20:30:20 -0500 Subject: [PATCH] Added version output --- gravity-sync.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gravity-sync.sh b/gravity-sync.sh index 2115e14..677c5e2 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -32,11 +32,11 @@ NC='\033[0m' ############################################## # IMPORT SETTINGS +echo -e "${CYAN}Importing gravity-sync.conf settings${NC}" if [ -f ~/${LOCAL_FOLDR}/gravity-sync.conf ] then - echo -e "${GREEN}Success${NC}: Importing gravity-sync.conf settings" - source gravity-sync.conf - echo -e "Configured for ${REMOTE_USER}@${REMOTE_HOST}" + source gravity-sync.conf + echo -e "${GREEN}Success${NC}: Configured for ${REMOTE_USER}@${REMOTE_HOST}" else echo -e "${RED}Failure${NC}: Required file gravity-sync.conf is missing!" echo -e "Please review installation documentation for more information" @@ -100,6 +100,7 @@ case $# in mv -v ~/${LOCAL_FOLDR}/${GRAVITY_FI} ~/${LOCAL_FOLDR}/${GRAVITY_FI}.last date >> ~/${LOCAL_FOLDR}/${SYNCING_LOG} echo -e "${GREEN}gravity.db pull completed${NC}" + exit ;; push) @@ -129,6 +130,11 @@ case $# in esac done ;; + + version) + echo -e "Gravity Sync ${VERSION}" + exit + ;; *) echo -e "${RED}'$1' is not a valid argument${NC}"