mirror of
https://github.com/zardus/ctf-tools
synced 2025-03-17 23:26:58 +00:00
Added ctf-tools-venv-activate3 script, which sources ctf-tools-activate under the hood
This commit is contained in:
parent
6538613482
commit
ce90837ff0
2 changed files with 18 additions and 5 deletions
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# let's stick with python 2 as default
|
||||
PY_VERSION=2
|
||||
# check this scripts file ending
|
||||
if [[ "$0" =~ pip3 ]]; then
|
||||
PY_VERSION=3
|
||||
|
@ -10,11 +8,18 @@ if [[ "$0" =~ pip2 ]]; then
|
|||
PY_VERSION=2
|
||||
fi
|
||||
|
||||
if [[ -z "${PY_VERSION+x}" ]]; then
|
||||
# if not defined otherwise let's stick with python 2 as default
|
||||
PY_VERSION=2
|
||||
fi
|
||||
|
||||
PY_INTERPRETER=$(which "python$PY_VERSION" || which python)
|
||||
|
||||
CTF_TOOLS_VE="ctftools"
|
||||
if [[ $PY_VERSION -eq 3 ]]; then
|
||||
CTF_TOOLS_VE="${CTF_TOOLS_VE}3"
|
||||
if [[ -z "${CTF_TOOLS_VE+x}" ]]; then
|
||||
CTF_TOOLS_VE="ctftools"
|
||||
if [[ $PY_VERSION -eq 3 ]]; then
|
||||
CTF_TOOLS_VE="${CTF_TOOLS_VE}3"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "${WORKON_HOME+x}" ]]; then
|
||||
|
|
8
bin/ctf-tools-venv-activate3
Executable file
8
bin/ctf-tools-venv-activate3
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
export PY_VERSION=3
|
||||
export CTF_TOOLS_VE="ctftools3"
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
source "$DIR/ctf-tools-venv-activate"
|
Loading…
Add table
Reference in a new issue