mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
only activate venv if present
This commit is contained in:
parent
90141c064b
commit
8074a04a41
2 changed files with 10 additions and 2 deletions
|
@ -12,7 +12,11 @@ IFS=$'\n'
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
||||||
|
|
||||||
source "$REPO_DIR/.venv/bin/activate"
|
if [[ -f "$REPO_DIR/.venv/bin/activate" ]]; then
|
||||||
|
source "$REPO_DIR/.venv/bin/activate"
|
||||||
|
else
|
||||||
|
echo "[!] Warning: No virtualenv presesnt in $REPO_DIR.venv"
|
||||||
|
fi
|
||||||
cd "$REPO_DIR"
|
cd "$REPO_DIR"
|
||||||
|
|
||||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
||||||
|
|
|
@ -12,7 +12,11 @@ IFS=$'\n'
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
||||||
|
|
||||||
source "$REPO_DIR/.venv/bin/activate"
|
if [[ -f "$REPO_DIR/.venv/bin/activate" ]]; then
|
||||||
|
source "$REPO_DIR/.venv/bin/activate"
|
||||||
|
else
|
||||||
|
echo "[!] Warning: No virtualenv presesnt in $REPO_DIR.venv"
|
||||||
|
fi
|
||||||
cd "$REPO_DIR"
|
cd "$REPO_DIR"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue