-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstallShopware.sh
executable file
·41 lines (32 loc) · 1.6 KB
/
installShopware.sh
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
37
38
39
40
41
#!/usr/bin/env bash
declare -A KNOWNVERSIONS=(
[5.7.7]=http://releases.s3.shopware.com.s3.amazonaws.com/install_5.7.7_cba194ae2aab11d165a3876608a481bcbb971f57.zip
[5.6.7]=http://releases.s3.shopware.com.s3.amazonaws.com/install_5.6.7_8cec71ed6df4804610664944e3f67e5d3a61adea.zip
[5.5.10]=http://releases.s3.shopware.com.s3.amazonaws.com/install_5.5.10_edfcb8e82f331fa5a0935a6c6ff35fe4348bf262.zip
[5.4.6]=http://releases.s3.shopware.com.s3.amazonaws.com/install_5.4.6_f667f6471a77bb5af0c115f3e243594e6353747e.zip
[5.3.7]=http://releases.s3.shopware.com.s3.amazonaws.com/install_5.3.7_741ae9fb77ecb227dc6be9c1028ded1e957c0e14.zip
[5.2.27]=http://releases.s3.shopware.com.s3.amazonaws.com/install_5.2.27_56d5aabc56c2e48d84084d0381a72a3897d5263f.zip
)
if [ -z "${KNOWNVERSIONS[$SHOPWARE_VERSION]}" ]; then
echo "This script does not know how to get shopware ${SHOPWARE_VERSION}"
echo "Please create a pull request at 'https://github.com/solutiondrive/docker-shopware-container' and"
echo "provide an url to get the requested version!"
exit 1
fi
SHOPWARE_URL=${KNOWNVERSIONS[$SHOPWARE_VERSION]}
if [ -z "${PROJECT_HOME}" ]; then
echo "$$PROJECT_HOME must be set!"
exit 1
fi
mkdir -p ${PROJECT_HOME}
echo "Everything is configured, starting setup:"
echo "PHP_VERSION: ${PHP_VERSION}"
echo "SHOPWARE_VERSION: ${SHOPWARE_VERSION}"
echo "SHOPWARE_URL: ${SHOPWARE_URL}"
echo "PROJECT_HOME: ${PROJECT_HOME}"
cd ${PROJECT_HOME}
echo "Downloading shopware"
wget -q -O install.zip "${SHOPWARE_URL}"
echo "Unzipping install.zip"
unzip -q install.zip
chown -R www-data:www-data ${PROJECT_HOME}/