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() {
|
||||
# init virtualenv directory
|
||||
if [ -n "$1" ] && [ -n "$2" ]; then
|
||||
echo -e "\nvirtualenv -p \"$1\" ~/.venv-$2\n"
|
||||
if [ -n "$3" ]; then
|
||||
echo -e "\nvirtualenv -p \"$1\" \"$3\" ~/.venv-$2\n"
|
||||
virtualenv -p "$1" "$3" ~/.venv-"$2"
|
||||
elif [ -n "$2" ]; then
|
||||
echo -e "\nvirtualenv -p \"$1\" ~/.venv-$2\n"
|
||||
virtualenv -p "$1" ~/.venv-"$2"
|
||||
else
|
||||
echo -e "\nvirtualenv ~/.venv\n"
|
||||
virtualenv ~/.venv
|
||||
|
@ -94,7 +97,7 @@ function virtualenv_activate() {
|
|||
# shellcheck disable=SC1090
|
||||
if [ -n "$1" ]; then
|
||||
echo -e "\n. ~/.venv-$1/bin/activate\n"
|
||||
. ~/.venv-$1/bin/activate
|
||||
. ~/.venv-"$1"/bin/activate
|
||||
else
|
||||
echo -e "\n. ~/.venv/bin/activate\n"
|
||||
. ~/.venv/bin/activate
|
||||
|
|
Loading…
Reference in New Issue
Block a user