Projects/nettsiden-old
Projects
/
nettsiden-old
Archived
8
0
Fork 0
This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
nettsiden-old/dev.sh

26 lines
1.3 KiB
Bash
Raw Normal View History

#!/bin/sh
2017-10-22 15:37:03 +02:00
2021-03-16 20:00:47 +01:00
which sqlite3 > /dev/null 2>&1 || (echo ERROR: sqlite not found; false) || exit 1
test ! -e pvv.sqlite && sqlite3 pvv.sqlite < dist/pvv.sql
test ! -e sql_config.php && cp -v dist/sql_config_example.php sql_config.php
2017-11-11 19:46:27 +01:00
2021-03-16 20:00:47 +01:00
test ! -e dataporten_config.php && cp -v dist/dataporten_config.php dataporten_config.php
2017-10-22 15:37:03 +02:00
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
2021-03-16 20:00:47 +01:00
if test ! -d vendor; then
php composer.phar install || exit $?
2017-10-22 15:37:03 +02:00
cp -v dist/authsources_example.php vendor/simplesamlphp/simplesamlphp/config/authsources.php
cp -v dist/saml20-idp-remote.php vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
2022-01-29 19:21:16 +01:00
cp -v vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php
2017-10-22 17:32:54 +02:00
sed -e "s/'trusted.url.domains' => array()/'trusted.url.domains' => array('localhost:1080')/g" < vendor/simplesamlphp/simplesamlphp/config-templates/config.php > vendor/simplesamlphp/simplesamlphp/config/config.php
2017-10-22 15:37:03 +02:00
ln -s ../vendor/simplesamlphp/simplesamlphp/www/ www/simplesaml
fi
2021-08-11 22:28:48 +02:00
php -S ${DOCKER_HOST:-[::1]}:${DOCKER_PORT:-1080} -d error_reporting=E_ALL -d display_errors=1 -t www/