diff --git a/gravity-sync.sh b/gravity-sync.sh index d9a3c21..fb21a00 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -1,7 +1,7 @@ #!/bin/bash # Gravity Sync by vmstan -VERSION='1.1.6' +VERSION='1.1.7' # Must execute from a location in the home folder of the user who own's it (ex: /home/pi/gravity-sync) # Configure certificate based SSH authentication between the Pihole HA nodes - it does not use passwords @@ -43,6 +43,17 @@ else exit fi +############################################## + +# FUNCTIONS + +function update_gs { + git reset --hard + git pull +} + + + ############################################## # print title @@ -143,10 +154,7 @@ case $# in update) echo -e "${GREEN}Success:${NC} Update Requested" - # echo -e "${PURPLE}Info:${NC} Gravity Sync ${VERSION}" - # echo -e "${YELLOW}UPDATING REQUIRES ORIGINAL INSTALL VIA GIT${NC}" - git reset --hard - git pull + update_gs exit ;;