-
Notifications
You must be signed in to change notification settings - Fork 377
/
Copy pathpyenv-delete.sh
executable file
·39 lines (29 loc) · 1017 Bytes
/
pyenv-delete.sh
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
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
# Author: Luigi Freda
# This file is part of https://github.com/luigifreda/pyslam
#N.B: this install script allows you to run main_slam.py and all the scripts
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # get script dir
SCRIPT_DIR=$(readlink -f $SCRIPT_DIR) # this reads the actual path if a symbolic directory is used
ROOT_DIR="$SCRIPT_DIR"
# ====================================================
# import the bash utils
. "$ROOT_DIR"/bash_utils.sh
STARTING_DIR=`pwd`
cd "$ROOT_DIR"
# ====================================================
#set -e
# Check if conda is installed
if command -v conda &> /dev/null; then
CONDA_INSTALLED=true
else
CONDA_INSTALLED=false
fi
# check that conda is activated
if [ "$CONDA_INSTALLED" = true ]; then
print_blue "Deleting pySLAM environment by using conda"
. pyenv-conda-delete.sh
else
print_blue "Deleting pySLAM environment by using venv"
. pyenv-venv-delete.sh
fi
cd "$STARTING_DIR"