Initial commit: Potatium
This commit is contained in:
commit
e2d0be22fd
58 files changed
+1551
No files matched your search
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# Idempotent. Called from any location; optional argument: project root.
|
||||
set -Eeuo pipefail
|
||||
DEFAULT_ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
ROOT=${1:-$DEFAULT_ROOT}
|
||||
if [[ ! -d "$ROOT" ]]; then
|
||||
echo "Project root does not exist: $ROOT" >&2; exit 1
|
||||
fi
|
||||
if [[ $EUID -eq 0 ]]; then echo 'Run as regular user potatium, not root.' >&2; exit 1; fi
|
||||
if [[ ! -f "$ROOT/AGENTS.md" || ! -f "$ROOT/README.md" ]]; then
|
||||
echo "Refusing to scaffold unrelated directory: missing AGENTS.md/README.md in $ROOT" >&2; exit 1
|
||||
fi
|
||||
DIRS=(
|
||||
cmd/potatiumd cmd/potatium-miner cmd/potatium-cli
|
||||
internal/app internal/chain internal/consensus internal/transaction
|
||||
internal/crypto internal/wallet internal/mining internal/lottery
|
||||
internal/registry internal/storage internal/api
|
||||
web/wallet tests/integration config deploy/devnet deploy/testnet
|
||||
docs/decisions assets/logo .vscode
|
||||
)
|
||||
for d in "${DIRS[@]}"; do
|
||||
mkdir -p "$ROOT/$d"
|
||||
if [[ ! -e "$ROOT/$d/.gitkeep" ]]; then : > "$ROOT/$d/.gitkeep"; fi
|
||||
done
|
||||
mkdir -p "$ROOT/.local-data" "$ROOT/bin"
|
||||
printf 'Project directories verified in %s\n' "$ROOT"
|
||||
printf 'Existing files are never replaced. Local data and bin/ are Git-ignored.\n'
|
||||
Reference in new issue
Block a user