526022e2bc
Track vps-clone-without-docker.sh and vps-sparse-checkout-no-docker.sh so a fresh GitHub clone can run the helper end-to-end. Mark both executable in git for ./ usage after clone.
30 lines
934 B
Bash
Executable File
30 lines
934 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Clone Dawnforger/Fractured and omit Docker-only paths. Use when this script is
|
|
# already on disk (e.g. scp). Otherwise: git clone … && cd Fractured && bash scripts/vps-sparse-checkout-no-docker.sh
|
|
#
|
|
# Usage:
|
|
# bash scripts/vps-clone-without-docker.sh /path/to/Fractured git@github.com:Dawnforger/Fractured.git
|
|
|
|
set -euo pipefail
|
|
|
|
TARGET="${1:?usage: $0 /path/to/Fractured <git-remote-url>}"
|
|
REMOTE="${2:?usage: $0 /path/to/Fractured <git-remote-url>}"
|
|
|
|
if [[ -e "$TARGET" ]]; then
|
|
echo "error: $TARGET already exists; remove it or pick another path." >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$(dirname "$TARGET")"
|
|
git clone "$REMOTE" "$TARGET"
|
|
|
|
cd "$TARGET"
|
|
if [[ ! -f scripts/vps-sparse-checkout-no-docker.sh ]]; then
|
|
echo "error: clone missing scripts/vps-sparse-checkout-no-docker.sh — pull latest main." >&2
|
|
exit 1
|
|
fi
|
|
|
|
bash scripts/vps-sparse-checkout-no-docker.sh
|
|
|
|
echo "Done. Next: docs/DEPLOY_LINUX_VPS.md"
|