chore: initialize Prime core structure
This commit is contained in:
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
BASE=/srv/prime-core
|
||||
COMMIT="${1:-}"
|
||||
[[ -n "$COMMIT" ]] || { echo "Usage: restore.sh <commit-id>"; exit 1; }
|
||||
cd "$BASE"
|
||||
git rev-parse --verify "$COMMIT^{commit}" >/dev/null
|
||||
SNAP="pre-restore-$(date -u +%Y%m%dT%H%M%SZ)"
|
||||
git tag "$SNAP" HEAD
|
||||
git checkout -f "$COMMIT"
|
||||
echo "Restored workspace to $COMMIT (saved $SNAP)"
|
||||
Reference in New Issue
Block a user