Skip to content

Commit 67d8042

Browse files
authored
updated install script (#4407)
1 parent c47df5b commit 67d8042

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.ddev/commands/web/openmage-install

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ while :; do
4343
echo "Enable maintenance mode..."
4444
touch maintenance.flag
4545

46-
LOCALXML="${ROOT}/app/etc/local.xml"
46+
LOCALXML="${ROOT}"/"${DDEV_DOCROOT}/app/etc/local.xml"
4747
if [ -f "${LOCALXML}" ]; then
4848
if [[ "${QUIET_INSTALL_FLAG}" ]]; then
4949
DELETE='y'
@@ -88,21 +88,25 @@ if [[ $INSTALL_SAMPLE_DATA =~ ^(yes|y) ]]; then
8888
tar xf "${SAMPLE_DATA_FILE}"
8989

9090
echo "Copying Sample Data into the OpenMage directory..."
91-
cp -r magento-sample-data-1.9.2.4/media/* "${ROOT}/media/"
92-
cp -r magento-sample-data-1.9.2.4/skin/* "${ROOT}/skin/"
91+
cd "${ROOT}" || exit
92+
cp -r "${SAMPLE_DATA_DIRECTORY}"/magento-sample-data-1.9.2.4/media/* "${ROOT}"/"${DDEV_DOCROOT}/media/"
93+
cp -r "${SAMPLE_DATA_DIRECTORY}"/magento-sample-data-1.9.2.4/skin/* "${ROOT}"/"${DDEV_DOCROOT}/skin/"
9394

9495
echo "Clearing var/cache..."
95-
rm -rf "${ROOT}/var/cache/"*
96+
rm -rf "${ROOT}"/"${DDEV_DOCROOT}/var/cache/"*
9697

9798
echo "Importing Sample Data into the database..."
98-
mysql -u db -h db db < "${SAMPLE_DATA_DIRECTORY}/magento-sample-data-1.9.2.4/magento_sample_data_for_1.9.2.4.sql"
99+
mysql -u db -h db db < "${SAMPLE_DATA_DIRECTORY}"/magento-sample-data-1.9.2.4/magento_sample_data_for_1.9.2.4.sql
99100

100101
# remove sample data
101102
if [[ "${SAMPLE_DATA_KEEP_FLAG}" ]]; then
102103
# shellcheck disable=SC2046
104+
cd "${ROOT}" || exit
105+
echo "Removing uncompressed files..."
103106
rm -rf magento-sample-data-1.9.2.4/
104107
else
105108
cd "${ROOT}" || exit
109+
echo "Removing sample data..."
106110
rm -rf "${SAMPLE_DATA_DIRECTORY}"
107111
fi
108112
fi
@@ -138,7 +142,7 @@ else
138142
fi
139143
fi
140144

141-
php -f install.php -- \
145+
php -f "${ROOT}"/"${DDEV_DOCROOT}/"install.php -- \
142146
--license_agreement_accepted 'yes' \
143147
--locale 'en_US' \
144148
--timezone 'America/New_York' \

0 commit comments

Comments
 (0)