From 80198d0d98a2b20cccc573b7e6ddc7e27a05d03f Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 16 Mar 2021 20:49:25 +0100 Subject: [PATCH] Make dev.sh download gitmodules Untested, it'll probably work --- README.md | 2 +- dev.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 35a1700..19c83ba 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ On Windows, you have to perform a `composer install` manually beforehand. Make s ### Dependency management -`dev.sh` will download the `composer` package manager to the php archive file `composer.phar` and run it. +`dev.sh` will ensure the git submodules have been pulled, then download the `composer` package manager to the php archive file `composer.phar` and run it. Composer will check for the php extension `pdo_sqlite` which must be enabled on your system. This usually includes installing a php-sqlite3 package and enabling it in /etc/php/php.ini: [PHP] diff --git a/dev.sh b/dev.sh index f716c23..a613267 100755 --- a/dev.sh +++ b/dev.sh @@ -8,6 +8,11 @@ test ! -e dataporten_config.php && cp -v dist/dataporten_config.php dataporten_c test -e composer.phar || curl -O https://getcomposer.org/composer.phar +if test ! -f lib/OAuth2-Client/OAuth2Client.php ; then + echo Missing git submodules. Installing... + (set -x; git submodule update --init --recursive) || exit $? +fi + if test ! -d vendor; then php composer.phar install || exit $? cp -v dist/authsources_example.php vendor/simplesamlphp/simplesamlphp/config/authsources.php