These instructions are intended for contributors. If you want to read the book, see: https://crigroup.gitbooks.io/osrobotics/content/ (live version), or http://www.osrobotics.org/osr/ (published version).
Installing GitBook is easy and straightforward. You just need:
- NodeJS (v4.0.0 and above is recommended)
You can install nodejs
from the Ubuntu package repositories:
sudo apt-get install nodejs
Now, let's create a symbolic link so that we can use the npm
command:
sudo ln -s /usr/bin/nodejs /usr/bin/node
Create a directory for the packages:
mkdir -p ~/.npm_packages
Indicate to npm
where to store the packages. In your ~/.npmrc
file add:
prefix=~/.npm_packages
Ensure npm
will find installed binaries and man pages. Add the following to
your ~/.bashrc
file:
NPM_PACKAGES="~/.npm_packages"
PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
Finally, source your ~/.bashrc
file manually:
source ~/.bashrc
Simply run the following command to install GitBook
sudo apt-get install npm
sudo npm install gitbook-cli -g
mkdir -p ~/git; cd ~/git
git clone https://github.com/crigroup/osrobotics.git
cd ~/git/osrobotics
gitbook install
gitbook serve
If everything is right, the website will be served here: http://localhost:4000
rsync -r -a -v -e "ssh -p2222" --delete _book/ user@server:osrobotics/osr/