]> jfr.im git - irc/thales.git/blob - ReportUsage.sh
e4898a828a561f99207eff3d49f5ac1418c70580
[irc/thales.git] / ReportUsage.sh
1 #!/bin/sh
2
3 echo "I'd like to collect some infos about who is using thales. This will only"
4 echo "take a few seconds to answer the questions."
5 echo
6 echo "Do you agree to answer them now [Y/N] ? (you can answer them later by"
7 echo "running ./ReportUsage.sh in thales' directory)."
8 echo -n "[Y] > "
9 read answer
10 if [ "X$answer" = "XN" -o "X$answer" = "Xn" ]; then
11 exit 0
12 fi
13
14 echo "On which network are you using thales ? Please give exact name, so that I"
15 echo "can eventually connect and say hi !"
16 echo -n "> "
17 read network
18 echo
19 echo "Which ircd are you using ?"
20 echo -n "> "
21 read ircd
22 echo
23 echo "What is the main language used on your network ?"
24 echo -n "> "
25 read lang
26 echo
27 echo "What is the approximate number of users on your network ?"
28 echo -n "> "
29 read size
30 echo
31 echo "What is your email address ? (you don't _need_ to answer this one)"
32 echo -n "> "
33 read email
34
35 version=`cat configure.in |grep AM_INIT_AUTOMAKE\(thales |sed -e 's/.*thales, \(.*\))/\1/'`
36 cat > mail.txt << ENDOFFILE
37 THALES USAGE
38
39 Network : $network
40 Ircd : $ircd
41 Language : $lang
42 Size : $size
43 Email : $email
44 Version : $version
45
46 Please mail this file to thales-usage@lucas-nussbaum.net
47 ENDOFFILE
48
49 echo "OK, that's all. Here are the results, saved in mail.txt :"
50 echo "--------------"
51 cat mail.txt
52 echo "--------------"
53 echo "Do you want me to mail the file using the standard unix 'mail'"
54 echo "command ? [Y/N]"
55 echo -n "[Y] > "
56 read answer
57 if [ "X$answer" = "XN" -o "X$answer" = "Xn" ]; then
58 echo "OK, please mail the content of mail.txt to thales-usage@lucas-nussbaum.net"
59 exit 0
60 fi
61
62 cat mail.txt |mail -s "thales usage" thales-usage@lucas-nussbaum.net
63 echo "mail sent, thanks !"
64 rm mail.txt
65 echo