mirror of
https://github.com/EmiiBytee/np2kai-ps4.git
synced 2026-10-29 04:01:22 +01:00
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT_DIR"
|
|
|
|
NP2KAI_REPO_URL="${NP2KAI_REPO_URL:-https://github.com/AZO234/NP2kai.git}"
|
|
NP2KAI_COMMIT="${NP2KAI_COMMIT:-e2dc9046aa5c786fcfbfb87e883457e421026e31}"
|
|
|
|
fail() { printf '\nERROR: %s\n' "$*" >&2; exit 1; }
|
|
|
|
command -v git >/dev/null 2>&1 || fail "Git no está instalado."
|
|
[[ ! -e .git ]] || fail "Esta carpeta ya es un repositorio Git."
|
|
|
|
if [[ -d third_party/NP2kai ]]; then
|
|
rmdir third_party/NP2kai 2>/dev/null || fail \
|
|
"third_party/NP2kai no está vacío. Usa la carpeta limpia preparada para GitHub."
|
|
fi
|
|
rm -f .gitmodules
|
|
|
|
git init -b main
|
|
git submodule add "$NP2KAI_REPO_URL" third_party/NP2kai
|
|
git -C third_party/NP2kai checkout --detach "$NP2KAI_COMMIT"
|
|
git add .
|
|
|
|
cat <<'MSG'
|
|
|
|
Repositorio preparado.
|
|
|
|
Revisa lo que se va a publicar:
|
|
git status
|
|
git diff --cached --stat
|
|
|
|
Después crea el primer commit:
|
|
git commit -m "Release NP2kai PS4 v1.0"
|
|
|
|
Y publícalo con GitHub CLI:
|
|
gh auth login
|
|
gh repo create np2kai-ps4 --public --source=. --remote=origin --push
|
|
MSG
|