This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Update the following parameters to reflect your server's setup. | |
| START_CMD="/home/pzserver/start-server.sh" | |
| STEAMCMD="/home/steamcmd/steamcmd.sh" | |
| LOG_DIR="/root/Zomboid/Logs" | |
| LOG_GLOB="*DebugLog-server.txt" | |
| # Those parameters should be okay as they are. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| num_files=$(git --no-pager diff --cached --name-only | wc -l) | |
| if [ "$num_files" -eq 0 ]; then | |
| echo -e "\033[91mERROR: You have no staged files.\033[0m" | |
| exit 0 | |
| fi | |
| total_size=$(git --no-pager diff --cached --name-only -z | xargs -0 du -b | awk '{total += $1} END {print total / 1024 / 1024}') |