forked from BitLucid/ninjawars
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure
executable file
·36 lines (32 loc) · 1.06 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
echo "DOMAIN=https://localhost:8765/" > CONFIG
echo "DBNAME=nw" >> CONFIG
echo "HOST=localhost" >> CONFIG
echo "PORT=5432" >> CONFIG
echo "DBUSER=ninjamaster" >> CONFIG
echo "DBCREATINGUSER=postgres" >> CONFIG
echo "CC_DIR=./cc/" >> CONFIG
echo "WEBUSER=www-data:adm" >> CONFIG
echo "NOCOVER=true" >> CONFIG
echo "NODE_VERSION=lts/hydrogen" >> CONFIG
echo "COMPOSER_AUTH={\"github-oauth\": {\"github.com\": \"${GITHUB_ACCESS_TOKEN}\"}}" >> CONFIG
echo "GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN}" >> CONFIG
if [ -f ./composer.phar ]
then
echo "COMPOSER=./composer.phar" >> CONFIG
elif [ -f ./composer ]
then
echo "COMPOSER=./composer" >> CONFIG
elif [ `which composer` ]
then
echo "COMPOSER:=`which composer`" >> CONFIG
else
>&2 echo "No suitable candidate found for COMPOSER"
fi
if [ -z GITHUB_ACCESS_TOKEN ]; then
echo "It is recommended to export GITHUB_ACCESS_TOKEN=some_token to
avoid being ratelimited by github."
fi
echo "CONFIG file created, modify it at will."
cat CONFIG
echo "Don't forget to set up your database and webserver yourself."