bootstrap 790 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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"

15
16
# Installs all packages specified in Pipfile (to avoid OS incompabilities)
pipenv install --dev --skip-lock
17
18
19
20
21
22
23
24
25
26

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

# 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/