-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathHANDY.sh
More file actions
executable file
·24 lines (18 loc) · 765 Bytes
/
HANDY.sh
File metadata and controls
executable file
·24 lines (18 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd -P )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd -P )"
# Default execution
SVE='python "'$DIR'/normingApp.py"'
CONDA_BASE=$(conda info --base)
source $CONDA_BASE/etc/profile.d/conda.sh . # Very dirty solution but works, by:
# https://github.com/conda/conda/issues/7980
conda activate HANDY-env
echo Calling $SVE "$@"
# which python
eval $SVE "$@"
conda deactivate