From 5d97a5f593d3d024e08e8d7f04cecedc677f0ffc Mon Sep 17 00:00:00 2001 From: Astra Date: Tue, 10 Mar 2026 07:33:56 +0000 Subject: [PATCH] Require sync.sh to be run from scripts/ directory --- scripts/sync.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/sync.sh b/scripts/sync.sh index 6308b94..ffcc7ae 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -1,9 +1,16 @@ #!/usr/bin/env bash # sync.sh — Copy telegram-join-approval-bot submodule into internal/, then apply patches. -# Usage: ./scripts/sync.sh +# Usage: cd scripts/ && ./sync.sh set -euo pipefail +# Ensure script is run from the scripts/ directory +if [[ "$(basename "$PWD")" != "scripts" ]]; then + echo "❌ This script must be run from the scripts/ directory." + echo " Usage: cd scripts/ && ./sync.sh" + exit 1 +fi + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"