From dc57c21448157c696bbe1315d2b7d7e5d3b9a180 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Sun, 5 Mar 2017 21:49:17 +0200 Subject: [PATCH] =?UTF-8?q?meson:=20update=20submodule=20only=20if=20it=20?= =?UTF-8?q?doesn=E2=80=99t=20exist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some build servers don’t have git installed, which makes the tarball build fail when trying to update the libgd submodule. This commit adds a check for the existence of the root meson.build of libgd before running git. https://bugzilla.gnome.org/show_bug.cgi?id=779603 --- check_libgd.sh | 8 ++++++++ meson.build | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 check_libgd.sh diff --git a/check_libgd.sh b/check_libgd.sh new file mode 100755 index 000000000..f1fabc0c3 --- /dev/null +++ b/check_libgd.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ ! -f "${MESON_SOURCE_ROOT}/libgd/meson.build" ] +then + git \ + --git-dir="${MESON_SOURCE_ROOT}/.git" \ + submodule update --init libgd +fi diff --git a/meson.build b/meson.build index 8a6d65914..13a92f69a 100644 --- a/meson.build +++ b/meson.build @@ -102,8 +102,8 @@ nautilus_include_dirs = include_directories ('.') subdir ('eel') subdir ('libnautilus-extension') -message ('Updating libgd submodule…') -run_command ('git', '--git-dir="$MESON_SOURCE_ROOT/.git"', 'submodule', 'update', '--init', 'libgd') +message ('Checking for libgd…') +run_command ('check_libgd.sh') libgd_options = ['static=true', 'with-gtk-hacks=true',