Blame view

install/update-app-php.sh 1.48 KB
1f42188e   Alexandre   Version: 2.4.4.4
1
2
3
4
5
6
7
8
#!/bin/bash

cp -p ../config/app.php ../config/app.php.ORIG
cp ../config/app.default.php ../config/app.php

username=$(grep "/\*d\*/'username'" ../config/app.php.ORIG | cut -d"'" -f4)
password=$(grep "/\*d\*/'password'" ../config/app.php.ORIG | cut -d"'" -f4)
database=$(grep "/\*d\*/'database'" ../config/app.php.ORIG | cut -d"'" -f4)
e9a0cc56   Alexandre   Version: 2.4.6.0
9
host=$(grep "/\*d\*/'host'" ../config/app.php.ORIG | cut -d"'" -f4)
1f42188e   Alexandre   Version: 2.4.4.4
10
11
12
13

usernameTEST=$(grep "/\*t\*/'username'" ../config/app.php.ORIG | cut -d"'" -f4)
passwordTEST=$(grep "/\*t\*/'password'" ../config/app.php.ORIG | cut -d"'" -f4)
databaseTEST=$(grep "/\*t\*/'database'" ../config/app.php.ORIG | cut -d"'" -f4)
e9a0cc56   Alexandre   Version: 2.4.6.0
14
hostTEST=$(grep "/\*t\*/'host'" ../config/app.php.ORIG | cut -d"'" -f4)
1f42188e   Alexandre   Version: 2.4.4.4
15
16
17
18

sed -e "s/'database' => 'database'/'database' => '$database'/" -i ../config/app.php
sed -e "s/'username' => 'username'/'username' => '$username'/" -i ../config/app.php
sed -e "s/'password' => 'password'/'password' => '$password'/" -i ../config/app.php
e9a0cc56   Alexandre   Version: 2.4.6.0
19
sed -e "s/'host' => 'localhost'/'host' => '$host'/" -i ../config/app.php
1f42188e   Alexandre   Version: 2.4.4.4
20
21
22
23

sed -e "s/'database' => 'test_database'/'database' => '$databaseTEST'/" -i ../config/app.php
sed -e "s/'username' => 'test_username'/'username' => '$usernameTEST'/" -i ../config/app.php
sed -e "s/'password' => 'test_password'/'password' => '$passwordTEST'/" -i ../config/app.php
e9a0cc56   Alexandre   Version: 2.4.6.0
24
sed -e "s/'host' => 'localhost'/'host' => '$hostTEST'/" -i ../config/app.php
1f42188e   Alexandre   Version: 2.4.4.4
25
26

sed -e "s/'debug' => filter_var(env('DEBUG', true/'debug' => filter_var(env('DEBUG', false/" -i ../config/app.php