-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·35 lines (29 loc) · 867 Bytes
/
setup.sh
File metadata and controls
executable file
·35 lines (29 loc) · 867 Bytes
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
#!/bin/sh
COMPOSER=bin/composer
if [ ! -f "$COMPOSER" ]; then
echo "* Installing Composer..."
EXPECTED_SIGNATURE="$(wget -q -O - http://composer.github.io/installer.sig)"
php -r "copy('http://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
mv composer.phar bin/composer
fi
echo ""
echo "* Installing packages..."
chmod 700 bin/composer
bin/composer install
echo "* Running database migrations..."
chmod 700 vendor/bin/phinx
vendor/bin/phinx migrate
echo ""
echo "* Setting file and folder permissions..."
sh set_permissions.sh
exit $RESULT