bootstrap 804 Bytes
Newer Older
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
# -*- coding: utf-8 -*-
#
# Copyright (C) 2019 CERN.
#
# CERN Search is free software; you can redistribute it and/or modify it under
# the terms of the MIT License; see LICENSE file for more details.

set -e

readonly SCRIPT_PATH=$(dirname "$0")
readonly SYS_PREFIX=$(python -c "import sys; print(sys.prefix)")
readonly INVENIO_INSTANCE_PATH="$SYS_PREFIX/var/instance"

# Installs all packages specified in Pipfile.lock
pipenv sync --dev

# Install application code and entrypoints from 'setup.py'
pip install -e $SCRIPT_PATH/../..

# Patch auth
sh $SCRIPT_PATH/../patch/oauth_patch.sh

# Build assets
invenio collect -v
invenio webpack buildall

# Move static files to instance folder
cp ${SCRIPT_PATH}/../../static/images/cernsearchicon.png ${INVENIO_INSTANCE_PATH}/static/images/