Commit 4a9a3805 authored by Hilal Ozdemir's avatar Hilal Ozdemir

dev.sh: when activating the virtual environment, install beiran and plugins...

dev.sh: when activating the virtual environment, install beiran and plugins only when they haven't been installed yet.
parents 79a3de6d 57040d24
......@@ -29,24 +29,36 @@ else
export PIP=$(which pip3 || which pip || echo 'pip')
fi
#install prerequisite package `yajl`
apt-get install libyajl2
apt-get install libyajl-dev
# make binary of 'tar-split' with Docker
tarsplit_dir=${DIR}/plugins/beiran_package_docker/
STAMP=$(date +%s)
INSTALLED=0
LAST_INSTALL=$(date -r ${VIRTUAL_ENV_DIR}/.last_install +%s 2>/dev/null || echo "0")
if [ ! -e ${tarsplit_dir}/tar-split ]; then
docker build -t tarsplit -f $tarsplit_dir/DockerfileTarsplit $tarsplit_dir
docker create --name tarsplit tarsplit && docker cp tarsplit:/tar-split ${tarsplit_dir}/tar-split && docker rm tarsplit && docker rmi tarsplit
fi
if [ $LAST_INSTALL -eq 0 ]; then
#install prerequisite package `yajl`
apt-get install libyajl2
apt-get install libyajl-dev
# make binary of 'tar-split' with Docker
tarsplit_dir=${DIR}/plugins/beiran_package_docker/
if [ ! -e ${tarsplit_dir}/tar-split ]; then
docker build -t tarsplit -f $tarsplit_dir/DockerfileTarsplit $tarsplit_dir
docker create --name tarsplit tarsplit && docker cp tarsplit:/tar-split ${tarsplit_dir}/tar-split && docker rm tarsplit && docker rmi tarsplit
fi
# install beiran
${PYTHON_BINARY} setup.py install
# install beiran
${PYTHON_BINARY} setup.py install
# install beiran_package_docker
cd ${DIR}/plugins/beiran_package_docker
${PYTHON_BINARY} setup.py install
# install beiran_package_docker
cd ${DIR}/plugins/beiran_package_docker
${PYTHON_BINARY} setup.py install
INSTALLED=1
fi
if [ $INSTALLED -eq 1 ]; then
echo $STAMP > ${VIRTUAL_ENV_DIR}/.last_install
fi
cat > ${VIRTUAL_ENV_DIR}/bin/beiran <<EOF
#!/bin/sh -e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment