Skip to content

Commit

Permalink
add python install.sh file
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaetanbrl committed May 25, 2023
1 parent 5241b79 commit 4afd63c
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# FULL PATH - WILL CLONE REPO TO THIS LOCATION
# EX : /home/<user>/git
WORKING_PATH="$1"

MVIEWERSTUDIO_DIR="mviewerstudio"


if [ "${WORKING_PATH}" ]; then
cd "${WORKING_PATH}"
MVIEWERSTUDIO_DIR="$1/mviewerstudio"
fi

STATIC_DIR="${MVIEWERSTUDIO_DIR}/srv/python/mviewerstudio_backend/static"


apt install libxslt1-dev libxml2-dev
pip install virtualenv

if [ ! -d "${MVIEWERSTUDIO_DIR}" ]; then
git clone https://github.com/jdev-org/mviewerstudio.git
fi

mkdir -p "${MVIEWERSTUDIO_DIR}/srv/python/mviewerstudio_backend/static/apps"
cp -r "${MVIEWERSTUDIO_DIR}/css" "${STATIC_DIR}"
cp -r "${MVIEWERSTUDIO_DIR}/img" "${STATIC_DIR}"
cp -r "${MVIEWERSTUDIO_DIR}/js" "${STATIC_DIR}"
cp -r "${MVIEWERSTUDIO_DIR}/lib" "${STATIC_DIR}"

cp "${MVIEWERSTUDIO_DIR}/mviewerstudio.i18n.json" "${STATIC_DIR}/mviewerstudio.i18n.json"
cp "${MVIEWERSTUDIO_DIR}/config-python-sample.json" "${STATIC_DIR}/apps/config.json"

cd "${MVIEWERSTUDIO_DIR}/srv/python"

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt -r dev-requirements.txt
pip install -e .

0 comments on commit 4afd63c

Please sign in to comment.