installer improvements

master
quadrismegistus 4 years ago
parent 74ef080ce4
commit f056c8bc88

@ -6,16 +6,21 @@ realpath() {
}
echo "Python (t1): `which python`"
path_lib="`realpath ~/comrad/lib`"
path_conda="`realpath ~/comrad/lib/miniconda3`"
path_venv="`realpath ~/comrad/code/venv`"
path_repo="`realpath ~/comrad/code`"
path_themis="$path_lib/themis/build"
source $path_conda/etc/profile.d/conda.sh
export PATH="$path_conda/Library/bin:$path_conda:$PATH"
# export PATH="$path_conda/Library/bin:$path_conda/Scripts:$path_conda:$PATH"
export PATH="$path_conda/bin:$PATH"
conda activate $path_venv
export LD_LIBRARY_PATH="$path_themis:$LD_LIBRARY_PATH"
python -m pip install -r $path_repo/requirements.txt
echo "Python (t2): `which python`"

@ -22,6 +22,7 @@ path_lib="`realpath ~/comrad/lib`"
path_conda="`realpath ~/comrad/lib/miniconda3`"
path_venv="`realpath ~/comrad/code/venv`"
path_repo="`realpath ~/comrad/code`"
path_themis="$path_lib/themis/build"
source "$path_conda/etc/profile.d/conda.sh"
# export PATH="$path_conda/Library/bin:$path_conda/Scripts:$path_conda:$PATH"
@ -42,6 +43,7 @@ then
fi
export LD_LIBRARY_PATH="$path_themis:$LD_LIBRARY_PATH"
python -m pip install -r $path_repo/requirements.txt -q
python $path_repo/comrad/app/main.py

@ -8,10 +8,13 @@ realpath() {
path_conda="`realpath ~/comrad/lib/miniconda3`"
path_venv="`realpath ~/comrad/code/venv`"
path_repo="`realpath ~/comrad/code`"
path_lib="`realpath ~/comrad/lib`"
path_themis="$path_lib/themis/build"
source $path_conda/etc/profile.d/conda.sh
export PATH="$path_conda/bin:$PATH"
conda activate $path_venv
export LD_LIBRARY_PATH="$path_themis:$LD_LIBRARY_PATH"
python -m pip install -r $path_repo/requirements.txt -q
export COMRAD_SHOW_LOG=0

@ -94,6 +94,8 @@ path_bin="$path_repo/bin"
# fi
path_themis="$path_lib/themis/build"
export LD_LIBRARY_PATH="$path_themis:$LD_LIBRARY_PATH"
@ -104,7 +106,7 @@ echo '
'
echo "Machine $machine detected."
echo "$machine detected."
@ -276,29 +278,6 @@ python -m pip install -r requirements.txt
#############################################################
echo '
Installing other requirements
Rlite, hardware based redis database
'
cd $path_lib
git clone https://github.com/seppo0010/rlite.git
cd rlite
make
make all
# exit 1
#########################################################################
if [ "$machine" = "Mac" ]
@ -312,7 +291,7 @@ fi
echo '
Themis, cryptography backend...
Installing Themis, cryptography backend...
'
@ -322,29 +301,37 @@ then
echo 'installing themis with brew'
/usr/local/bin/brew tap cossacklabs/tap
/usr/local/bin/brew install libthemis
else
if [ ! -f "/usr/local/lib/libthemis.so" ]
fi
if [ "$machine" = "Linux" ]
then
REQUIRED_PKG="libssl-dev"
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $REQUIRED_PKG|grep "install ok installed")
echo "Checking for prerequisite $REQUIRED_PKG: $PKG_OK"
if [ "" = "$PKG_OK" ]; then
echo "No $REQUIRED_PKG. Setting up $REQUIRED_PKG. This needs sudo."
sudo apt-get --yes install $REQUIRED_PKG
# mkdir -p "$path_lib/var/lib/dpkg"
# touch "$path_lib/var/lib/dpkg/lock"
# apt-get download libssl-dev; dpkg -i --force-not-root --root=$path_lib libssl-dev.deb
fi
echo 'Building Themis...'
cd "$path_lib"
if [ ! -d "$themis" ]
then
if [ ! -f "/usr/lib/libthemis.so" ]
then
echo 'building themis'
cd "$path_lib"
# pwd
#git clone https://github.com/cossacklabs/themis.git
curl https://codeload.github.com/cossacklabs/themis/zip/master -o themis.zip
unzip -q -o themis.zip
#mv themis-master themis
cd themis-master
make
make install
# sudo make install
fi
curl https://codeload.github.com/cossacklabs/themis/zip/master -o themis.zip
unzip -q -o themis.zip
mv themis-master themis
fi
cd themis
make
fi
echo '
Completing...

Loading…
Cancel
Save