Convert doc into a shell script

Signed-off-by: Gianpaolo Macario <gmacario@gmail.com>