Added version output

This commit is contained in:
Michael Stanclift 2020-05-21 20:30:20 -05:00
parent d80cf2cb9c
commit b4007f89dc

View File

@ -32,11 +32,11 @@ NC='\033[0m'
############################################## ##############################################
# IMPORT SETTINGS # IMPORT SETTINGS
echo -e "${CYAN}Importing gravity-sync.conf settings${NC}"
if [ -f ~/${LOCAL_FOLDR}/gravity-sync.conf ] if [ -f ~/${LOCAL_FOLDR}/gravity-sync.conf ]
then then
echo -e "${GREEN}Success${NC}: Importing gravity-sync.conf settings" source gravity-sync.conf
source gravity-sync.conf echo -e "${GREEN}Success${NC}: Configured for ${REMOTE_USER}@${REMOTE_HOST}"
echo -e "Configured for ${REMOTE_USER}@${REMOTE_HOST}"
else else
echo -e "${RED}Failure${NC}: Required file gravity-sync.conf is missing!" echo -e "${RED}Failure${NC}: Required file gravity-sync.conf is missing!"
echo -e "Please review installation documentation for more information" 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 mv -v ~/${LOCAL_FOLDR}/${GRAVITY_FI} ~/${LOCAL_FOLDR}/${GRAVITY_FI}.last
date >> ~/${LOCAL_FOLDR}/${SYNCING_LOG} date >> ~/${LOCAL_FOLDR}/${SYNCING_LOG}
echo -e "${GREEN}gravity.db pull completed${NC}" echo -e "${GREEN}gravity.db pull completed${NC}"
exit
;; ;;
push) push)
@ -129,6 +130,11 @@ case $# in
esac esac
done done
;; ;;
version)
echo -e "Gravity Sync ${VERSION}"
exit
;;
*) *)
echo -e "${RED}'$1' is not a valid argument${NC}" echo -e "${RED}'$1' is not a valid argument${NC}"