Skip to content

Commit dfc6c70

Browse files
committed
compact some case statements
1 parent 26999bf commit dfc6c70

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tools/build_test_env.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,15 @@
1717
PY_VER=2
1818
while getopts :p: opt "$@"; do
1919
case $opt in
20-
p)
21-
PY_VER=$OPTARG;;
22-
*)
23-
echo "Unknown option: $opt"
24-
exit 1;;
20+
p) PY_VER=$OPTARG;;
21+
*) echo "Unknown option: $opt"; exit 1;;
2522
esac
2623
done
2724

2825
case $PY_VER in
2926
2) VENV_CMD=virtualenv;;
3027
3) VENV_CMD=pyvenv;;
31-
*)
32-
echo "Wrong python version (2 or 3)"
33-
exit 1;;
28+
*) echo "Wrong python version (2 or 3)"; exit 1;;
3429
esac
3530

3631
VENV=$(pwd)/.venv

0 commit comments

Comments
 (0)