forked from Bitmessage/buildbot-scripts
travis2bash argument fix
- also minor code quality
This commit is contained in:
parent
456a458e86
commit
be2aadb276
|
@ -80,9 +80,12 @@ function aptinstall() {
|
||||||
|
|
||||||
function virtualenv_init() {
|
function virtualenv_init() {
|
||||||
# init virtualenv directory
|
# init virtualenv directory
|
||||||
if [ -n "$1" ] && [ -n "$2" ]; then
|
if [ -n "$3" ]; then
|
||||||
echo -e "\nvirtualenv -p \"$1\" ~/.venv-$2\n"
|
echo -e "\nvirtualenv -p \"$1\" \"$3\" ~/.venv-$2\n"
|
||||||
virtualenv -p "$1" "$3" ~/.venv-"$2"
|
virtualenv -p "$1" "$3" ~/.venv-"$2"
|
||||||
|
elif [ -n "$2" ]; then
|
||||||
|
echo -e "\nvirtualenv -p \"$1\" ~/.venv-$2\n"
|
||||||
|
virtualenv -p "$1" ~/.venv-"$2"
|
||||||
else
|
else
|
||||||
echo -e "\nvirtualenv ~/.venv\n"
|
echo -e "\nvirtualenv ~/.venv\n"
|
||||||
virtualenv ~/.venv
|
virtualenv ~/.venv
|
||||||
|
@ -94,7 +97,7 @@ function virtualenv_activate() {
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
echo -e "\n. ~/.venv-$1/bin/activate\n"
|
echo -e "\n. ~/.venv-$1/bin/activate\n"
|
||||||
. ~/.venv-$1/bin/activate
|
. ~/.venv-"$1"/bin/activate
|
||||||
else
|
else
|
||||||
echo -e "\n. ~/.venv/bin/activate\n"
|
echo -e "\n. ~/.venv/bin/activate\n"
|
||||||
. ~/.venv/bin/activate
|
. ~/.venv/bin/activate
|
||||||
|
|
Loading…
Reference in New Issue
Block a user