Moved development scripts into a dev directory.
This can optionally and ideally be omitted from your deployment. Purely for local development.
This commit is contained in:
Executable
+57
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "================================="
|
||||
echo " MiniPHP Initializer"
|
||||
echo "================================="
|
||||
echo
|
||||
|
||||
# Remove git remote if it exists
|
||||
if git remote get-url origin >/dev/null 2>&1; then
|
||||
git remote remove origin
|
||||
echo "[✓] Removed existing git remote 'origin'"
|
||||
else
|
||||
echo "[i] No git remote 'origin' found"
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
# Gather README information
|
||||
read -rp "Project title: " PROJECT_TITLE
|
||||
read -rp "Project description: " PROJECT_DESCRIPTION
|
||||
|
||||
# Create README
|
||||
cat > README.md << EOF
|
||||
# ${PROJECT_TITLE}
|
||||
|
||||
${PROJECT_DESCRIPTION}
|
||||
EOF
|
||||
|
||||
echo "[✓] Generated README.md"
|
||||
echo
|
||||
echo "================================="
|
||||
echo " Next Steps"
|
||||
echo "================================="
|
||||
echo
|
||||
echo "Create a new repository and add it as the remote:"
|
||||
echo
|
||||
echo " git remote add origin <your-repo-url>"
|
||||
echo " git branch -M main"
|
||||
echo " git push -u origin main"
|
||||
echo
|
||||
|
||||
# Optional self-delete
|
||||
read -rp "Delete init_miniphp.sh? [y/N]: " DELETE_SCRIPT
|
||||
case "$DELETE_SCRIPT" in
|
||||
[yY]|[yY][eE][sS])
|
||||
SCRIPT_PATH="$(realpath "$0")"
|
||||
echo "[✓] Removing $SCRIPT_PATH"
|
||||
rm -f "$SCRIPT_PATH"
|
||||
;;
|
||||
*)
|
||||
echo "[i] Keeping init_miniphp.sh"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo
|
||||
echo "[✓] Initialization complete"
|
||||
Reference in New Issue
Block a user