]> git.immae.eu Git - github/wallabag/wallabag.git/blame_incremental - scripts/install.sh
Fix status from Instapaper
[github/wallabag/wallabag.git] / scripts / install.sh
... / ...
CommitLineData
1#!/usr/bin/env bash
2# You can execute this file to install wallabag
3# eg: `sh install.sh prod`
4
5IGNORE_ROOT_ARG="--ignore-root-warning"
6IGNORE_ROOT=0
7
8if [ "$1" == "$IGNORE_ROOT_ARG" ]; then
9 IGNORE_ROOT=1
10fi
11
12# Abort running this script if root
13if [ "$IGNORE_ROOT" -eq 0 ] && [ "$EUID" == "0" ]; then
14 echo "Do not run this script as root!" >&2
15 echo "Use $IGNORE_ROOT_ARG to ignore this error." >&2
16 exit 1
17fi
18
19COMPOSER_COMMAND='composer'
20
21DIR="${BASH_SOURCE}"
22if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi
23. "$DIR/require.sh"
24
25ENV=$1
26TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
27
28git checkout $TAG
29SYMFONY_ENV=$ENV $COMPOSER_COMMAND install --no-dev -o --prefer-dist
30php bin/console wallabag:install --env=$ENV