forked from fluffle/sp0rkle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
82 lines (58 loc) · 2.45 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Getting started, from scratch:
1) Install some dependencies and MANY version control systems.
sudo apt-get install build-essential bison mongodb libsqlite3-dev
sudo apt-get install mercurial git bzr
Ensure you have mongodb 2.x or higher
mongod --version
db version v2.2.1, pdfile version 4.5
If not the following page may help
http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
2) Build go.
cd $HOME # do this in your home directory
hg clone -u release https://go.googlecode.com/hg/ go
cd go/src
./all.bash
# ... wait for compile ...
# consider putting these in ~/.bashrc too...
export GOROOT="$HOME/go"
export GOPATH="$HOME/gocode"
export PATH="$PATH:$GOROOT/bin:$GOPATH/bin"
# ... and creating the GOPATH directory structure.
# (read `go help gopath` for details of this)
mkdir -p $GOPATH/{src,pkg,bin}
3) Use the `go` tool to get dependencies.
go get github.com/fluffle/goirc/client
go get github.com/kuroneko/gosqlite3
go get labix.org/v2/mgo
4) Clone sp0rkle's code from github.
cd $GOPATH/src/github.com/fluffle
# Note: in order to submit patches more easily, you might want to get a github
# account, fork the bot, and clone from your own writeable version.
# If you do that, clone with:
git clone git@github.com:<username>/sp0rkle.git
# and then add my repository as an alternative remote to pull from:
cd sp0rkle
git remote add -f -m master fluffle http://github.com/fluffle/sp0rkle.git
# Otherwise, just clone from my repository:
git clone http://github.com/fluffle/sp0rkle.git
5) Import the old databases into mongo:
go install github.com/fluffle/sp0rkle/util/importers/factimporter
factimporter --db=/path/to/db
go install github.com/fluffle/sp0rkle/util/importers/quoteimporter
quoteimporter --db=/path/to/db
# If you don't know where to get the dbs, you shouldn't be submitting patches :-)
6) Code, build, commit, push :)
while coding in $GOPATH/src/github.com/fluffle/sp0rkle/sp0rkle:
vim <stuff>:wq
go build
# Run local build for testing ...
./sp0rkle --server irc.pl0rt.org[:port] [--nick=mybot] [--channels='#test']
^C
git add <stuff>
git commit -m "Some useful message about the edit to <stuff>."
# If you cloned from your own repo:
git push # pushes changes in your branches up to github
# ... then send me a pull request on github :-)
# Otherwise, I guess you'll have to mail me a patch, or something:
# This might work, untested, you should read man git-format-patch(1).
git format-patch --attach --stdout --to=abramley@gmail.com | mail