setup: Make sure submodule is cloned and translations setup

This commit is contained in:
southerntofu 2020-09-23 12:51:09 -04:00
parent fc387c377b
commit 0aebb8c97b
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ORIGDIR="$(pwd)"
cd "$(dirname "$0")"
# Ensure the spec submodule was cloned
if [ ! -d spec ]; then
if [ ! -f spec/README.md ]; then
echo "git submodule was not initialized before. Doing it now"
git submodule init
if ! git submodule update; then
@ -16,7 +16,7 @@ fi
# Copy the translations to ~/.local/share/forgebuild
FORGEBUILD_DATA=$HOME/.local/share/forgebuild
if [ ! -d $FORGEBUILD_DATA ]; then
if [ ! -f $FORGEBUILD_DATA/i18n/en.json ]; then
if ! mkdir -p $FORGEBUILD_DATA; then
echo "Failed to create folder $FORGEBUILD_DATA to store translations"
exit 2