General > Helpful posts

Using Bazaar to update multiple bots on the same system (Linux)

(1/1)

Khalem:
This is a rough guide put together on request from Zeephonz.

Please note that this setup should only be attempted if you are fairly knowledgable about PHP and know how to handle running unstable code as you can never be certain that code checked out from the Bazaar repository is in a working state, even though we do attempt to keep it running.

First we checkout the latest codebase we want to use.
For the latest stable branch (as of this post this is 0.6) we want to issue the command

--- Code: ---bzr co lp:bebot/0.6 <destination folder>

--- End code ---

For the purpose of this guide, i will assume you name the folder stable-0.6

We now create the folder in which our configuration and other files like custom modules will live as we for the purpose of this setup want to keep the bazaar working directory clean.


--- Code: ---mkdir BeBot

--- End code ---

Now copy the following folders and files from stable-0.6/ to BeBot/

--- Code: ---conf/
custom/
log/
themes/
txt/
StartBot.php

--- End code ---

You can now safely edit all the files contained in those directories, without having to worry about conflicts when updating your working directory or worrying that any of your changes to these files will be overwritten.

The next step is to link the remaining folders and files from the working folder to your actual BeBot folder.
This example assumes you are sitting outside the folders and that both are sitting in the same folder on your system.

--- Code: ---ln -s stable-0.6/core BeBot/core
ln -s stable-0.6/extra BeBot/extra
ln -s stable-0.6/main BeBot/main
ln -s stable-0.6/modules BeBot/modules
ln -s stable-0.6/Sources BeBot/Sources
ln -s stable-0.6/Main.php BeBot/Main.php

--- End code ---

Now all you have to do is configure your bots as normal for a multi bot setup and update your bot using bazaar by going into the stable-0.6 folder and issuing

--- Code: ---bzr up

--- End code ---

If for any reason you need to revert to an older version of the bot you can issue

--- Code: ---bzr revert -r <revision>

--- End code ---

Where <revision> is the revision number you want to go back to.

If you are feeling brave and really want to live life on the edge you can exchange the original checkout command with

--- Code: ---bzr co lp:bebot <target folder>

--- End code ---

This will check out the latest development trunk. Be warned however that this is the bleeding edge and will very often be broken and or incomplete.

Navigation

[0] Message Index

Go to full version