Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Limych committed Mar 26, 2021
1 parent 9378c2d commit 3f739d4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ ROOT="$( cd "$( dirname "$(readlink -f "$0")" )/.." >/dev/null 2>&1 && pwd )"
cd "${ROOT}"

python=$(which python3)
pip="${python} -m pip"

# Load common functions
source ./bin/_common
Expand All @@ -17,8 +16,11 @@ if [ ! -d "venv" ]; then
log.info "Initializing the virtual environment..."
${python} -m venv venv
source ./venv/bin/activate
python="${ROOT}/venv/bin/python3"
fi

pip="${python} -m pip"

log.info "Updating PIP..."
${pip} install --upgrade pip

Expand All @@ -38,15 +40,12 @@ while true; do
REQ=$(echo "${REQ}" | sed -e "/^-r\\s\+${FILE_R}/{r ${FILE}" -e "d" -e "}")
done
done
GIT=$(echo "${REQ}" | grep "{GITHUB_TOKEN}" | tr '\r\n' ' ')
REQ=$(echo "${REQ}" | grep -v "{GITHUB_TOKEN}" | tr '\r\n' ' ')

if test -n "${GIT}"; then
if echo "${REQ}" | grep -q "{GITHUB_TOKEN}"; then
GITHUB_TOKEN=$(grep github_token secrets.yaml | cut -d' ' -f2)
GIT=$(echo "${GIT}" | sed "s/{GITHUB_TOKEN}/${GITHUB_TOKEN}/g")
${pip} install --upgrade ${GIT}
REQ=$(echo "${REQ}" | sed "s/{GITHUB_TOKEN}/${GITHUB_TOKEN}/g")
fi

${pip} install --upgrade ${REQ}
${pip} install --upgrade $(echo "${REQ}" | tr '\r\n' ' ')

${pip} install -e .

0 comments on commit 3f739d4

Please sign in to comment.