diff --git a/lib/globals.sh b/lib/globals.sh index 60d1146..cb3ff29 100644 --- a/lib/globals.sh +++ b/lib/globals.sh @@ -42,6 +42,7 @@ alias do_sync='rsync -avhu --progress --delete --partial --links' ################### GLOBAL FUNCTIONS ######################### msg() { printf '\n[*] %s\n\n' "$*" + sh webhook.sh "$*" } errmsg() { >&2 printf '\n[Error]: %s\n\n' "$*" diff --git a/webhook.sh b/lib/webhook.sh similarity index 97% rename from webhook.sh rename to lib/webhook.sh index 7d59d96..61bcb5a 100644 --- a/webhook.sh +++ b/lib/webhook.sh @@ -10,3 +10,5 @@ msg() { -H "Content-Type:application/json" \ --data "{\"content\": $message}" } + +msg "$@" diff --git a/modserver_update.sh b/modserver_update.sh index 5193769..7e7d527 100644 --- a/modserver_update.sh +++ b/modserver_update.sh @@ -18,7 +18,12 @@ # =================================================== echo "Starting, attempting to load globals.sh" -GLOBALS_FILE="$PWD/lib/globals.sh" +# grab fresh copy of all helper scripts / libraries +if [ -d "$PWD/lib" ] ; then + cp -f "$PWD/lib"/* . +fi + +GLOBALS_FILE="$PWD/globals.sh" if [ -e "$GLOBALS_FILE" ] ; then chmod +x "$GLOBALS_FILE" . "$GLOBALS_FILE" diff --git a/scripts/re-pull-git.sh b/scripts/re-pull-git.sh index 034841f..458b594 100644 --- a/scripts/re-pull-git.sh +++ b/scripts/re-pull-git.sh @@ -1,4 +1,5 @@ #!/bin/sh chmod -x globals.sh +git stash git pull diff --git a/unlock_remote_server.sh b/scripts/unlock_remote_server.sh similarity index 100% rename from unlock_remote_server.sh rename to scripts/unlock_remote_server.sh