¡Hyperling.com 2.0! #16

Merged
me merged 75 commits from dev into main 2025-10-14 14:54:55 -07:00
Showing only changes of commit 6e3666cea2 - Show all commits

View File

@@ -27,14 +27,24 @@ function reload-project {
## Main ##
# Pull any updates, and if the project is already up to date, exit successfully.
git pull | grep -v "up to date"
status="$?"
log "Pull status is '$status'."
if [[ $status != 0 ]]; then
output="`git pull`"
git_status="$?"
echo "$output" | grep -v "up to date"
grep_status="$?"
log "Pull status is '$git_status', anything but 'up to date' is '$grep_status'."
if [[ $git_status != 0 ]]; then
log "*** ERROR: Git reported a failure! ***"
exit 1
elif [[ $git_status == 0 && $grep_status == 0 ]]; then
reload-project
elif [[ $git_status == 0 && $grep_status != 0 ]]; then
log "Site is already up to date, exiting."
exit 0
else
reload-project
log "*** WARNING: Unknown Situation ***"
fi
exit 0