File tree Expand file tree Collapse file tree 1 file changed +35
-12
lines changed
Expand file tree Collapse file tree 1 file changed +35
-12
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,39 @@ completed_msg() {
172172 echo " ================================================================"
173173}
174174
175+ continue_or_exit () {
176+ RESPONSE=" "
177+
178+ while [ " $RESPONSE " != " C" ] && [ " $RESPONSE " != " X" ]; do
179+
180+ echo -n " Would you like to (C)ontinue or E(x)it? "
181+ read -n1 RESPONSE
182+ echo
183+ RESPONSE=${RESPONSE^}
184+
185+ if [ " $RESPONSE " == " X" ]; then
186+ echo " Operation canceled"
187+ exit 1
188+ fi
189+ done
190+ }
191+
192+ check_email () {
193+ if ! cat testing.conf | egrep ' ^maintainer_email\s*=.*@.*$' > /dev/null 2>&1 ; then
194+ echo
195+ echo " ================================================================"
196+ echo " Warning: there appears to be no maintainer email specified. "
197+ echo " A maintainer email can help the PSI/J team contact you when "
198+ echo " problems arise with the test suite. It is highly recommended "
199+ echo " that you provide one. "
200+ echo " If you would like to do that, please exit this script and add "
201+ echo " your email to the relevant line in testing.conf. "
202+ echo " ================================================================"
203+ echo
204+
205+ continue_or_exit
206+ fi
207+ }
175208
176209FORCE=0
177210
@@ -192,20 +225,10 @@ echo "environment module please do so and then re-run this script. "
192225echo " ================================================================"
193226echo
194227
195- RESPONSE=" "
196228
197- while [ " $RESPONSE " != " C " ] && [ " $RESPONSE " != " X " ] ; do
229+ continue_or_exit
198230
199- echo -n " Would you like to (C)ontinue or E(x)it? "
200- read -n1 RESPONSE
201- echo
202- RESPONSE=${RESPONSE^}
203-
204- if [ " $RESPONSE " == " X" ]; then
205- echo " Operation canceled"
206- exit 1
207- fi
208- done
231+ check_email
209232
210233cd " $MYPATH "
211234
You can’t perform that action at this time.
0 commit comments