[csw-devel] SF.net SVN: opencsw:[294] ircbot
skayser at users.sourceforge.net
skayser at users.sourceforge.net
Fri Feb 18 19:19:35 CET 2011
Revision: 294
http://opencsw.svn.sourceforge.net/opencsw/?rev=294&view=rev
Author: skayser
Date: 2011-02-18 18:19:35 +0000 (Fri, 18 Feb 2011)
Log Message:
-----------
ircbot: add bot instance setup helper
Added Paths:
-----------
ircbot/add-instance.sh
Property Changed:
----------------
ircbot/
Property changes on: ircbot
___________________________________________________________________
Added: svn:ignore
+ *.bak
Added: ircbot/add-instance.sh
===================================================================
--- ircbot/add-instance.sh (rev 0)
+++ ircbot/add-instance.sh 2011-02-18 18:19:35 UTC (rev 294)
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# add-instance.sh <botname> [channel]:
+# Create a supybot configuration based on example-bot.conf
+#
+
+[ $# -lt 1 ] && { echo "Usage: $0 <botname> [channel]"; exit 1; }
+
+BOTNAME=$1
+CHANNEL=${2:-}
+
+sed \
+ -e "s,^\(supybot.nick:\).*,\1 $BOTNAME," \
+ -e "s,^\(supybot.networks.freenode.channels:\).*,\1 $CHANNEL," \
+ example-bot.conf >> $BOTNAME.conf
+
+echo "Your bot is setup. To run it, execute: supybot $BOTNAME.conf"
Property changes on: ircbot/add-instance.sh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list