]>
Commit | Line | Data |
---|---|---|
6b088341 GB |
1 | #!/bin/sh |
2 | # This script is responsible for passing the correct config directory | |
3 | # to the sbnc executable when installed in a user's home directory | |
4 | # rather than globally (e.g. in /usr/local). | |
7f1de01b GB |
5 | |
6 | # Warn the user about some 1.1/1.2 scripts which have to be removed | |
7 | # from the config dir in order for 1.3 to work properly. | |
8 | OLDSCRIPTS=$(cat <<SCRIPTS | |
9 | account.tcl 42c64365e7a164070d5654ccbb64377b 1.1 | |
10 | awaymessage.tcl 9cc28da74c1f3e5b73c6cd684db8fe61 1.1 | |
11 | bind.tcl c0eb82d9f886d422bbf13eb8d660901c 1.1 | |
12 | botnet.tcl 0fd6e1b9096ffdaa399659e2ab04e7ec 1.1 | |
13 | channel.tcl 87de5bf170cefd81dba5dd7d05eb291b 1.1 | |
14 | contact.tcl adf2977bfa33e4d9a8129460d943fb5b 1.1 | |
15 | fakemode.tcl c0c91760e0fd8108fb1056432485b78a 1.1 | |
16 | iface.tcl 03a98b36f77da663e50921dcea89894d 1.1 | |
17 | lock.tcl fd6e6ff9437c26c5dc429b9e73ac82a5 1.1 | |
18 | misc.tcl bedf2fe3e8d34aa15fc3cf3228e8e953 1.1 | |
19 | partyline.tcl fb3c437f759abfcb021beacf07ed995d 1.1 | |
20 | pushmode.tcl 0e7b6b680d63d3aae41eef7b290092eb 1.1 | |
21 | qauth.tcl 728851409f6baaf894b0503cbae6992c 1.1 | |
22 | socket.tcl 06d84ff03f6581ebf8a46471004a52b9 1.1 | |
23 | stubs.tcl bffdbb8eda083a06297308d15b4e4f14 1.1 | |
24 | tcl.tcl 01a1a39e27cc66555e8958258f80b646 1.1 | |
25 | timers.tcl d80a5d60ba1ae485b958ac2b17ba5b03 1.1 | |
26 | usys.tcl 8e32a7ea0becf75ef0ffe45c598e110d 1.1 | |
27 | variables.tcl c2cd17aee479dfc267376c174aeb4729 1.1 | |
28 | vhost.tcl 276fbbea203e4f4f55b0a41e02e14f51 1.1 | |
29 | virtual.tcl 5d697fb4df8b401085c8a54d4c6c4301 1.1 | |
30 | account.tcl 51d55e5427612d3003a0d92a1caafc64 1.2 | |
31 | alltools.tcl b426fd0c8281717d10e71e057e2e659e 1.1/1.2 | |
32 | bind.tcl 4ed0c2f48f49882d8fd068cd9b46103b 1.2 | |
33 | botnet.tcl b3bcb817b725510d906c7c99a4fd2464 1.2 | |
34 | channel.tcl 6200b6e92e0bf2eed909ea0e2ea89a94 1.2 | |
35 | contact.tcl 8c017097c0c7dc38304c7e2854f9296d 1.2 | |
36 | defaultserver.tcl cb00265535da979ddbe0bf98a7ff1ea6 1.2 | |
37 | highlight.tcl 1b3725fdb5f3b278bbcc4fc88b3b9a66 1.1/1.2 | |
38 | iface2.tcl 642d06d9e3bccaeef2d04b7fa6e6a81f 1.2 | |
39 | ifacecmds.tcl 54e589e85c286218c721b9106889e5f7 1.2 | |
40 | iface.tcl f10e75e2c75a86d23d606375dd5f84cc 1.2 | |
41 | itype.tcl 91399dc4516fb458575de460dad7b65a 1.2 | |
42 | lock.tcl 83015a2863f61a201b69542cb676539e 1.2 | |
43 | misc.tcl 1075df27e53cd15c010f2168b15c2240 1.2 | |
44 | namespace.tcl d08ad86f98a9346fd0bb2a32c0e74553 1.1/1.2 | |
45 | partyline.tcl 7ea59fd5915450fa326cfcf973777846 1.2 | |
46 | pushmode.tcl dd788021ee9a821e5d3de47e9b652f35 1.2 | |
47 | qauth.tcl a4c149ab35b4e6eba48140f0d889af59 1.2 | |
48 | socket.tcl 2593fd099d0743b9cd38c30701778f38 1.2 | |
49 | stubs.tcl f75183275ca16c5b7507072197f10143 1.2 | |
50 | tcl.tcl 75d52ee9b1aeab487c6ee2e445e09fcf 1.2 | |
51 | telnetclient.tcl d366ee8e42a97d256a37f50b9bb75574 1.2 | |
52 | telnet.tcl 5c2404e9ef83b666b9dfb03443a35def 1.2 | |
53 | timers.tcl 1ff4c355350dfd5dd673072f0398f303 1.2 | |
54 | usys.tcl 3705971a96cdaf77ec9ea6528536885a 1.2 | |
55 | variables.tcl 3f87da16ec3dcbceb0b3679fa94152c6 1.2 | |
56 | version.tcl 9efac435e62efc1e437de71486eb320b 1.1/1.2 | |
57 | vhost.tcl a498594e0560c6729cdfa138db6a1e45 1.2 | |
58 | virtual.tcl 463f17b016fa06050e01b5de7acdb107 1.2 | |
59 | SCRIPTS | |
60 | ) | |
61 | ||
62 | cd `dirname $0` || exit 1 | |
63 | ||
64 | FOUNDOLDSCRIPT=0 | |
65 | ||
66 | IFS=' | |
67 | ' | |
68 | ||
69 | for SCRIPTINFO in $OLDSCRIPTS; do | |
70 | SCRIPT=$(echo $SCRIPTINFO | cut -f1 -d' ') | |
71 | OLDHASH=$(echo $SCRIPTINFO | cut -f2 -d' ') | |
72 | VERSION=$(echo $SCRIPTINFO | cut -f3 -d' ') | |
73 | ||
74 | if [ ! -f scripts/$SCRIPT ]; then | |
75 | continue | |
76 | fi | |
77 | ||
78 | NEWHASH=$(md5sum scripts/$SCRIPT | cut -f1 -d' ') | |
79 | ||
80 | if [ "x$OLDHASH" = "x$NEWHASH" ]; then | |
81 | if [ $FOUNDOLDSCRIPT -eq 0 ]; then | |
82 | echo "The default location for shroudBNC's built-in TCL scripts has changed in version 1.3. Older" | |
83 | echo "versions of shroudBNC kept both built-in as well as user scripts in the 'scripts' directory." | |
84 | echo "Starting with version 1.3 the built-in scripts are now in share/sbnc/scripts and should not" | |
85 | echo "be modified. This change was necessary to support installing shroudBNC in a read-only" | |
86 | echo "location (e.g. /usr). It is NOT necessary to update your sbnc.tcl file. Please refer to" | |
87 | echo "the INSTALL file for more details." | |
88 | echo "" | |
89 | echo "shroudBNC has detected old versions of some built-in scripts in your configuration directory:" | |
90 | echo "" | |
91 | fi | |
92 | ||
93 | FOUNDOLDSCRIPT=1 | |
94 | echo "* scripts/$SCRIPT (version $VERSION)" | |
95 | fi | |
96 | done | |
97 | ||
98 | if [ $FOUNDOLDSCRIPT -ne 0 ]; then | |
99 | echo "" | |
100 | echo "shroudBNC cannot start while these files are present. Please either rename or remove them and make sure" | |
101 | echo "that there aren't any other built-in scripts from previous versions in case you edited any of them." | |
102 | echo "This check only reports unmodified script files." | |
103 | echo "" | |
104 | echo "shroudBNC was NOT started." | |
105 | ||
106 | exit 1 | |
107 | fi | |
108 | ||
dd4e4ae2 | 109 | exec bin/sbnc --config `pwd` "$@" |