Last active
May 19, 2025 18:40
-
-
Save Calinou/cd4c67e2a44377c9fb772500daa467f5 to your computer and use it in GitHub Desktop.
Scripts to initialize and edit a Godot project for quick testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# For Linux and macOS. | |
# The Godot editor must be in your `PATH` as `godot` for this script to work. | |
# Licensed under CC0 1.0 Universal. | |
set -euo pipefail | |
IFS=$'\n\t' | |
if [[ ! "${1:-}" || "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then | |
echo "Usage: $(basename "$0") <path>" | |
# Exit with code 0 only if help was explicitly requested | |
if [[ "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi | |
fi | |
mkdir -p "$1" | |
touch "$1/project.godot" | |
godot "$1/project.godot" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: For Windows. | |
:: The Godot editor must be in your `PATH` as `godot.exe` for this script to work. | |
:: Licensed under CC0 1.0 Universal. | |
mkdir "%1" | |
type NUL >> "%1\project.godot" | |
godot "%1\project.godot" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment