Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | #!/bin/sh |
2 | ############################################################################### | |
3abe9331 | 3 | # Copyright (c) 2000-2015 Ericsson Telecom AB |
970ed795 EL |
4 | # All rights reserved. This program and the accompanying materials |
5 | # are made available under the terms of the Eclipse Public License v1.0 | |
6 | # which accompanies this distribution, and is available at | |
7 | # http://www.eclipse.org/legal/epl-v10.html | |
8 | ############################################################################### | |
9 | ||
10 | # SCCSID: %Z%%M% %I% %G% | |
11 | # | |
12 | ||
13 | head -1 > /tmp/$$.input | |
14 | if xterm -title "Question from TTCN" -e sh -c "echo ''; cat /tmp/$$.input; echo ''; echo 'Answer Yes or No and Press RETURN'; head -1 > /tmp/$$.output" | |
15 | then | |
16 | ans=`cat /tmp/$$.output` | |
17 | case $ans in | |
18 | Yes*) echo "Yes";; | |
19 | yes*) echo "Yes";; | |
20 | YES*) echo "Yes";; | |
21 | Y*) echo "Yes";; | |
22 | No*) echo "No";; | |
23 | no*) echo "No";; | |
24 | NO*) echo "No";; | |
25 | N*) echo "No";; | |
26 | *) echo $ans;; | |
27 | esac | |
28 | /bin/rm -f /tmp/$$.input | |
29 | /bin/rm -f /tmp/$$.output | |
30 | exit 0 | |
31 | else | |
32 | /bin/rm -f /tmp/$$.input | |
33 | /bin/rm -f /tmp/$$.output | |
34 | exit 1 | |
35 | fi |