aboutsummaryrefslogtreecommitdiffhomepage
path: root/install.sh
blob: 414f73f273f8df6b5ed2b02db3fb8405ff8c6345 (plain) (blame)
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
#! /usr/bin/env bash

if [[ $ASSETS == 'nobuild' ]]; then
    composer install --no-interaction --no-progress --prefer-dist -o
else

    echo "Installing PHP dependencies through Composer..."
    if [[ $ASSETS == 'build' ]]; then
        composer install --no-interaction --no-progress --prefer-dist -o
    else
        SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
    fi

    chmod ugo+x vendor/mouf/nodejs-installer/bin/local/npm
    echo "Downloading javascript librairies through npm..."
    vendor/mouf/nodejs-installer/bin/local/npm install

    echo "Downloading fonts librairies through bower..."
    node_modules/bower/bin/bower install

    echo "Concat, minify and installing assets..."
    node_modules/grunt/bin/grunt

    if [[ $ASSETS != 'build' ]]; then
        echo "Installing wallabag..."
        php bin/console wallabag:install --env=prod
    fi

fi