mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-24 18:20:25 +01:00
5a290e927a
Fresh clones of this repo will need to install Gut using gd-plug: ``` godot --no-window -s plug.gd install ``` Similar to how git submodules also need to be installed.
25 lines
719 B
Text
Executable file
25 lines
719 B
Text
Executable file
#! /usr/bin/env nix-shell
|
|
#! nix-shell -i sh -p python38
|
|
set -e
|
|
|
|
GDTOOLKIT_VERSION=f5e2746d146200ec07ac6acb6fb378fd4c64f3f0
|
|
|
|
FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep '\.gd$' | grep -v '^addons/gd-plug' | grep -v '^addons/gut' | sed 's| |\\ |g')
|
|
echo $FILES
|
|
[ -z "$FILES" ] && exit 0
|
|
|
|
# Setup GDScript Toolkit.
|
|
if [ ! -f .venv/bin/activate ] || ! source .venv/bin/activate; then
|
|
python -m venv .venv && source .venv/bin/activate;
|
|
fi
|
|
if ! gdformat --version; then
|
|
pip install git+git://github.com/Scony/godot-gdscript-toolkit@${GDTOOLKIT_VERSION};
|
|
fi
|
|
|
|
# Format all selected files.
|
|
echo "$FILES" | xargs gdformat
|
|
|
|
# Add back the formatted files to staging.
|
|
echo "$FILES" | xargs git add
|
|
|
|
exit 0
|