Add godot-setup method/command
This commit is contained in:
parent
77a0ab89ba
commit
83f0821b36
1 changed files with 61 additions and 0 deletions
|
@ -34,6 +34,67 @@ function osu-oszimport() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
function godot-setup() {
|
||||||
|
(
|
||||||
|
set -eo pipefail
|
||||||
|
if [ ! -f "project.godot" ]; then
|
||||||
|
echo ":: Error: No project.godot file was found."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$HELP" ]; then
|
||||||
|
echo ":: Available environment variables:"
|
||||||
|
echo " \$CORE_BRANCH=<develop|stable>"
|
||||||
|
echo " \$INSTALL_SUI=<false|true>"
|
||||||
|
echo " \$INSTALL_VENUS=<false|true>"
|
||||||
|
echo ""
|
||||||
|
echo ":: Note: The first listed value is the default"
|
||||||
|
echo " for that specific environment variable."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
if [ -z "$CORE_BRANCH" ]; then CORE_BRANCH=develop; fi
|
||||||
|
if [ -z "$INSTALL_SUI" ]; then INSTALL_SUI=false; fi
|
||||||
|
if [ -z "$INSTALL_VENUS" ]; then INSTALL_VENUS=false; fi
|
||||||
|
|
||||||
|
if [ ! -d ".git" ]; then
|
||||||
|
echo ":: Initializing git repository"
|
||||||
|
git init -b develop
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ":: Creating files"
|
||||||
|
wget -q --show-progress "https://www.gnu.org/licenses/agpl-3.0.txt" -O LICENSE
|
||||||
|
cat << EOF >> README.md
|
||||||
|
# New project
|
||||||
|
You need to fill this README.md out.
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo ":: Removing default icon"
|
||||||
|
rm -rf icon.png
|
||||||
|
|
||||||
|
echo ":: Creating directories"
|
||||||
|
mkdir -p src scenesrc assets/{images,sprites,music,sfx,fonts,themes} dist/submodules addons
|
||||||
|
|
||||||
|
echo ":: Installing CORE"
|
||||||
|
git submodule add https://git.staropensource.de/StarOpenSource/CORE-distrib-git.git dist/submodules/CORE
|
||||||
|
(
|
||||||
|
cd dist/submodules/CORE
|
||||||
|
git checkout "$CORE_BRANCH"
|
||||||
|
)
|
||||||
|
ln -s dist/submodules/CORE CORE
|
||||||
|
|
||||||
|
if [ "$INSTALL_SUI" == "true" ]; then
|
||||||
|
echo ":: Installing StarOpenSource UI"
|
||||||
|
git submodule add https://git.staropensource.de/StarOpenSource/SUI-distrib.git dist/submodules/SUI
|
||||||
|
ln -s ../dist/submodules/SUI addons/SUI
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$INSTALL_VENUS" == "true" ]; then
|
||||||
|
echo ":: Installing Venus"
|
||||||
|
git submodule add https://git.staropensource.de/StarOpenSource/venus.git dist/submodules/Venus
|
||||||
|
ln -s ../dist/submodules/Venus addons/venus
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
}
|
||||||
export "RUSTFLAGS=-Z threads=$(nproc)"
|
export "RUSTFLAGS=-Z threads=$(nproc)"
|
||||||
export "EDITOR=nano"
|
export "EDITOR=nano"
|
||||||
function cleanhome() {
|
function cleanhome() {
|
||||||
|
|
Loading…
Reference in a new issue