diff --git a/addons/godot_xterm/native/build.sh b/addons/godot_xterm/native/build.sh index 42959ad..507ac4e 100755 --- a/addons/godot_xterm/native/build.sh +++ b/addons/godot_xterm/native/build.sh @@ -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 diff --git a/misc/export_templates/build.sh b/misc/export_templates/build.sh index e27b5cb..d96d724 100755 --- a/misc/export_templates/build.sh +++ b/misc/export_templates/build.sh @@ -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