mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-10 04:40:25 +01:00
Build scripts: check if submodule directories are empty
In a freshly cloned repo, submodule directories exist but are not empty. Check if they are empty and update submodules. Previously, submodules where only updated if their directories did not exist.
This commit is contained in:
parent
bdda1458c0
commit
3fb2580fc6
2 changed files with 3 additions and 3 deletions
|
@ -16,12 +16,12 @@ fi
|
|||
|
||||
# Update git submodules.
|
||||
LIBTSM_DIR=${NATIVE_DIR}/thirdparty/libtsm
|
||||
if [ ! -d "$LIBTSM_DIR" ]; then
|
||||
if [ -z "$(ls -A -- "$LIBTSM_DIR")" ]; then
|
||||
cd ${NATIVE_DIR}
|
||||
git submodule update --init --recursive -- $LIBTSM_DIR
|
||||
fi
|
||||
GODOT_CPP_DIR=${NATIVE_DIR}/thirdparty/godot-cpp
|
||||
if [ ! -d "${GODOT_CPP_DIR}" ]; then
|
||||
if [ -z "$(ls -A -- "$GODOT_CPP_DIR")" ]; then
|
||||
cd ${NATIVE_DIR}
|
||||
git submodule update --init --recursive -- $GODOT_CPP_DIR
|
||||
fi
|
||||
|
|
|
@ -6,7 +6,7 @@ EXPORT_TEMPLATES_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
|||
|
||||
# Update git submodules.
|
||||
GODOT_DIR=${EXPORT_TEMPLATES_DIR}/godot
|
||||
if [ ! -d "$GODOT_DIR" ]; then
|
||||
if [ -z "$(ls -A -- "$GODOT_DIR")" ]; then
|
||||
cd ${EXPORT_TEMPLATES_DIR}
|
||||
git submodule update --init --recursive -- $GODOT_DIR
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue