Skip to content

Commit

Permalink
if cond -eq
Browse files Browse the repository at this point in the history
  • Loading branch information
b23prodtm committed Dec 2, 2018
1 parent 6485709 commit c795cf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Scripts/bootargs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,25 @@ red="\033[0;31m"
green="\033[0;32m"
orange="\033[0;33m"
cyan="\033[0;36m"
#; Host name (unix) 'localhost' generally replaces '127.0.0.1' (macOS).
export DATABASE_ENGINE="Mysql"
export DATABASE_SERVICE_NAME="mysql"
#; Host name (unix) 'localhost' generally replaces '127.0.0.1' (macOS).
#;export MYSQL_SERVICE_HOST="127.0.0.1"
export MYSQL_SERVICE_HOST="localhost"
export MYSQL_SERVICE_PORT="3306"
#; To override, use shell parameter -dbase=<name> instead
export DATABASE_NAME="phpcms"
export DATABASE_USER="root"
#; To override, shell parameter -p=<password> instead
#;export DATABASE_PASSWORD=""
#. Test configuration ?test=1, ./test_cake.sh
#;export TEST_MYSQL_SERVICE_HOST="127.0.0.1"
export TEST_MYSQL_SERVICE_HOST="localhost"
export TEST_MYSQL_SERVICE_PORT="3306"
#; To override, use shell parameter -tbase=<name> instead
export TEST_DATABASE_NAME="cakephp_test"
export TEST_DATABASE_USER="test"
#; To override, use shell parameter -t=<password> instead
#;export TEST_DATABASE_PASSWORD=""
export FTP_SERVICE_HOST="localhost"
export FTP_SERVICE_USER="test"
Expand Down
6 changes: 3 additions & 3 deletions migrate-database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fix_socket="-Y"
config_app_checked=""
update_checked=0
import_identities=0
identities=app/Config/database.sql
identities=app/Config/Schema/database.sql
new_pass=""
new_test_pass=""
saved=("$*")
Expand Down Expand Up @@ -112,7 +112,7 @@ if [[ -f $identities ]]; then source ./Scripts/cp_bkp_old.sh . $identities ${ide
# configure user application database and eventually alter user database access
[ -z $dbfile ] && [ $fix_socket == "-N" ] && [ -f app/Config/database.php ] || config_app_checked="-Y"
shell_prompt "./Scripts/config_app_database.sh ${dbfile} ${fix_socket}" "${cyan}Setup ${dbfile} connection and socket\n${nc}" $config_app_checked
if [[ $import_identities ]]; then
if [[ $import_identities -eq 1 ]]; then
echo -e "Importing the mysql ${cyan}${DATABASE_USER}${nc} and ${cyan}${TEST_DATABASE_USER}${nc} users SQL identities..."
echo -e "\r${red}WARNING: You will modify SQL ${DATABASE_USER} password !${nc}" &&
parse_sql_password "$new_pass" "set_DATABASE_PASSWORD" "new ${DATABASE_USER}" &&
Expand All @@ -139,7 +139,7 @@ if [[ $import_identities ]]; then
export DATABASE_PASSWORD=$set_DATABASE_PASSWORD
export TEST_DATABASE_PASSWORD=$set_TEST_DATABASE_PASSWORD
fi
if [[ $update_checked ]]; then
if [[ $update_checked -eq 1 ]]; then
#; update plugins and dependencies
source ./Scripts/composer.sh "-o"
#; cakephp shell
Expand Down

0 comments on commit c795cf5

Please sign in to comment.