:-'Generic Commit'
Some checks failed
dropshell-build / build (push) Failing after 1m30s

This commit is contained in:
Your Name 2025-05-31 11:01:49 +12:00
parent e0527e2a24
commit b980de4347

View File

@ -5,7 +5,6 @@ set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
VERSION=$(date +%Y.%m%d.%H%M) VERSION=$(date +%Y.%m%d.%H%M)
VERSION_FILE="$HOME/.config/dropshell-build/version"
# If the user is not root, use sudo # If the user is not root, use sudo
SUDOCMD="" SUDOCMD=""
@ -17,6 +16,9 @@ if [ -n "${SUDO_USER:-}" ] && [ "$SUDO_USER" != "root" ]; then
USER_HOME=$(eval echo "~${SUDO_USER}") USER_HOME=$(eval echo "~${SUDO_USER}")
fi fi
VERSION_FILE="$USER_HOME/.config/dropshell-build/version"
mkdir -p "$(dirname "$VERSION_FILE")"
# test sudo is working or we're root (return non-zero if not root!) # test sudo is working or we're root (return non-zero if not root!)
if ! ${SUDOCMD:-} true; then if ! ${SUDOCMD:-} true; then
echo "Error: This script must be run as root or with sudo privileges." >&2 echo "Error: This script must be run as root or with sudo privileges." >&2