Require sync.sh to be run from scripts/ directory
This commit is contained in:
parent
cf8a6a71a7
commit
5d97a5f593
1 changed files with 8 additions and 1 deletions
|
|
@ -1,9 +1,16 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# sync.sh — Copy telegram-join-approval-bot submodule into internal/, then apply patches.
|
# 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
|
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)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue