1
0
mirror of synced 2024-11-23 05:46:09 +03:00
bitrix-module/tests/bin/before_script.sh

22 lines
522 B
Bash
Raw Normal View History

2019-02-28 14:45:39 +03:00
#!/usr/bin/env bash
if [ -d $TRAVIS_BUILD_DIR ]; then
2019-02-28 15:11:49 +03:00
BITRIX_PATH="$TRAVIS_BUILD_DIR/bitrix"
2019-02-28 14:45:39 +03:00
fi
download() {
2019-02-28 15:11:49 +03:00
wget http://download.retailcrm.pro/modules/bitrix/bitrix.tar.gz
2019-02-28 14:45:39 +03:00
2019-02-28 15:15:41 +03:00
mkdir $BITRIX_PATH
tar -xf $TRAVIS_BUILD_DIR/bitrix.tar.gz -C $BITRIX_PATH
rm $TRAVIS_BUILD_DIR/bitrix.tar.gz
2019-02-28 14:45:39 +03:00
}
create_db() {
2019-02-28 15:11:49 +03:00
mysqladmin create $DB_BITRIX_NAME --user="$DB_BITRIX_LOGIN" --password="$DB_BITRIX_PASS"
2019-02-28 15:35:09 +03:00
mysql --user="$DB_BITRIX_LOGIN" --password="$DB_BITRIX_PASS" $DB_BITRIX_NAME < $BITRIX_PATH/dump.sql
2019-02-28 14:45:39 +03:00
}
download
create_db