Skip to content

Instantly share code, notes, and snippets.

@Calinou
Last active May 19, 2025 18:40
Show Gist options
  • Save Calinou/cd4c67e2a44377c9fb772500daa467f5 to your computer and use it in GitHub Desktop.
Save Calinou/cd4c67e2a44377c9fb772500daa467f5 to your computer and use it in GitHub Desktop.
Scripts to initialize and edit a Godot project for quick testing
#!/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"
@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