@@ -67,34 +67,6 @@ if [[ "$CFG_QUIET" == "" ]]; then
67
67
fi
68
68
69
69
70
- # ###############################
71
- # Main command line entry point
72
- main () {
73
- CFG_REQUIREMENTS=$REQUIREMENTS
74
- NO_INDEX=" --no-index"
75
-
76
- # We are using getopts to parse option arguments that start with "-"
77
- while getopts :-: optchar; do
78
- case " ${optchar} " in
79
- -)
80
- case " ${OPTARG} " in
81
- help ) cli_help;;
82
- clean ) find_python && clean;;
83
- dev ) CFG_REQUIREMENTS=" $DEV_REQUIREMENTS " ;;
84
- init ) NO_INDEX=" " ;;
85
- esac ;;
86
- esac
87
- done
88
-
89
- PIP_EXTRA_ARGS=" $PIP_EXTRA_ARGS $NO_INDEX "
90
-
91
- find_python
92
- create_virtualenv " $VIRTUALENV_DIR "
93
- install_packages " $CFG_REQUIREMENTS "
94
- . " $CFG_BIN_DIR /activate"
95
- }
96
-
97
-
98
70
# ###############################
99
71
# Find a proper Python to run
100
72
# Use environment variables or a file if available.
@@ -197,6 +169,29 @@ clean() {
197
169
}
198
170
199
171
200
- main
172
+ # ###############################
173
+ # Main command line entry point
174
+ CFG_REQUIREMENTS=$REQUIREMENTS
175
+
176
+ # We are using getopts to parse option arguments that start with "-"
177
+ while getopts :-: optchar; do
178
+ case " ${optchar} " in
179
+ -)
180
+ case " ${OPTARG} " in
181
+ help ) cli_help;;
182
+ clean ) find_python && clean;;
183
+ dev ) CFG_REQUIREMENTS=" $DEV_REQUIREMENTS " ;;
184
+ init ) ;;
185
+ esac ;;
186
+ esac
187
+ done
188
+
189
+ PIP_EXTRA_ARGS=" $PIP_EXTRA_ARGS "
190
+
191
+ find_python
192
+ create_virtualenv " $VIRTUALENV_DIR "
193
+ install_packages " $CFG_REQUIREMENTS "
194
+ . " $CFG_BIN_DIR /activate"
195
+
201
196
202
197
set +e
0 commit comments