1
0
mirror of synced 2024-11-22 21:36:10 +03:00
bitrix-module/tests/bin/before_script.sh
2019-02-28 15:35:09 +03:00

22 lines
522 B
Bash
Executable File

#!/usr/bin/env bash
if [ -d $TRAVIS_BUILD_DIR ]; then
BITRIX_PATH="$TRAVIS_BUILD_DIR/bitrix"
fi
download() {
wget http://download.retailcrm.pro/modules/bitrix/bitrix.tar.gz
mkdir $BITRIX_PATH
tar -xf $TRAVIS_BUILD_DIR/bitrix.tar.gz -C $BITRIX_PATH
rm $TRAVIS_BUILD_DIR/bitrix.tar.gz
}
create_db() {
mysqladmin create $DB_BITRIX_NAME --user="$DB_BITRIX_LOGIN" --password="$DB_BITRIX_PASS"
mysql --user="$DB_BITRIX_LOGIN" --password="$DB_BITRIX_PASS" $DB_BITRIX_NAME < $BITRIX_PATH/dump.sql
}
download
create_db