]> jfr.im git - irc/gunnarbeutner/shroudbnc.git/blame - sbnc-start
Add auto-generated files to .gitignore
[irc/gunnarbeutner/shroudbnc.git] / sbnc-start
CommitLineData
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.
8OLDSCRIPTS=$(cat <<SCRIPTS
9account.tcl 42c64365e7a164070d5654ccbb64377b 1.1
10awaymessage.tcl 9cc28da74c1f3e5b73c6cd684db8fe61 1.1
11bind.tcl c0eb82d9f886d422bbf13eb8d660901c 1.1
12botnet.tcl 0fd6e1b9096ffdaa399659e2ab04e7ec 1.1
13channel.tcl 87de5bf170cefd81dba5dd7d05eb291b 1.1
14contact.tcl adf2977bfa33e4d9a8129460d943fb5b 1.1
15fakemode.tcl c0c91760e0fd8108fb1056432485b78a 1.1
16iface.tcl 03a98b36f77da663e50921dcea89894d 1.1
17lock.tcl fd6e6ff9437c26c5dc429b9e73ac82a5 1.1
18misc.tcl bedf2fe3e8d34aa15fc3cf3228e8e953 1.1
19partyline.tcl fb3c437f759abfcb021beacf07ed995d 1.1
20pushmode.tcl 0e7b6b680d63d3aae41eef7b290092eb 1.1
21qauth.tcl 728851409f6baaf894b0503cbae6992c 1.1
22socket.tcl 06d84ff03f6581ebf8a46471004a52b9 1.1
23stubs.tcl bffdbb8eda083a06297308d15b4e4f14 1.1
24tcl.tcl 01a1a39e27cc66555e8958258f80b646 1.1
25timers.tcl d80a5d60ba1ae485b958ac2b17ba5b03 1.1
26usys.tcl 8e32a7ea0becf75ef0ffe45c598e110d 1.1
27variables.tcl c2cd17aee479dfc267376c174aeb4729 1.1
28vhost.tcl 276fbbea203e4f4f55b0a41e02e14f51 1.1
29virtual.tcl 5d697fb4df8b401085c8a54d4c6c4301 1.1
30account.tcl 51d55e5427612d3003a0d92a1caafc64 1.2
31alltools.tcl b426fd0c8281717d10e71e057e2e659e 1.1/1.2
32bind.tcl 4ed0c2f48f49882d8fd068cd9b46103b 1.2
33botnet.tcl b3bcb817b725510d906c7c99a4fd2464 1.2
34channel.tcl 6200b6e92e0bf2eed909ea0e2ea89a94 1.2
35contact.tcl 8c017097c0c7dc38304c7e2854f9296d 1.2
36defaultserver.tcl cb00265535da979ddbe0bf98a7ff1ea6 1.2
37highlight.tcl 1b3725fdb5f3b278bbcc4fc88b3b9a66 1.1/1.2
38iface2.tcl 642d06d9e3bccaeef2d04b7fa6e6a81f 1.2
39ifacecmds.tcl 54e589e85c286218c721b9106889e5f7 1.2
40iface.tcl f10e75e2c75a86d23d606375dd5f84cc 1.2
41itype.tcl 91399dc4516fb458575de460dad7b65a 1.2
42lock.tcl 83015a2863f61a201b69542cb676539e 1.2
43misc.tcl 1075df27e53cd15c010f2168b15c2240 1.2
44namespace.tcl d08ad86f98a9346fd0bb2a32c0e74553 1.1/1.2
45partyline.tcl 7ea59fd5915450fa326cfcf973777846 1.2
46pushmode.tcl dd788021ee9a821e5d3de47e9b652f35 1.2
47qauth.tcl a4c149ab35b4e6eba48140f0d889af59 1.2
48socket.tcl 2593fd099d0743b9cd38c30701778f38 1.2
49stubs.tcl f75183275ca16c5b7507072197f10143 1.2
50tcl.tcl 75d52ee9b1aeab487c6ee2e445e09fcf 1.2
51telnetclient.tcl d366ee8e42a97d256a37f50b9bb75574 1.2
52telnet.tcl 5c2404e9ef83b666b9dfb03443a35def 1.2
53timers.tcl 1ff4c355350dfd5dd673072f0398f303 1.2
54usys.tcl 3705971a96cdaf77ec9ea6528536885a 1.2
55variables.tcl 3f87da16ec3dcbceb0b3679fa94152c6 1.2
56version.tcl 9efac435e62efc1e437de71486eb320b 1.1/1.2
57vhost.tcl a498594e0560c6729cdfa138db6a1e45 1.2
58virtual.tcl 463f17b016fa06050e01b5de7acdb107 1.2
59SCRIPTS
60)
61
62cd `dirname $0` || exit 1
63
64FOUNDOLDSCRIPT=0
65
66IFS='
67'
68
69for 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
96done
97
98if [ $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
107fi
108
dd4e4ae2 109exec bin/sbnc --config `pwd` "$@"