2013-03-23 18:50:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
src=$1
|
|
|
|
dest=$2
|
|
|
|
|
|
|
|
if ! [ `which ronn` ]; then
|
|
|
|
echo 'ronn rubygem is not installed, run "gem install ronn"'
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p $(dirname $dest)
|
|
|
|
|
|
|
|
# VERSION=$(grep version package.json | perl -pi -e 's/[^-\d\.]//g')
|
|
|
|
|
|
|
|
case $dest in
|
|
|
|
*.[13])
|
2013-07-16 18:48:37 +00:00
|
|
|
ronn --roff $1 --pipe --organization=1602\ Software --manual=LoopbackData > $2
|
2013-03-23 18:50:01 +00:00
|
|
|
exit $?
|
|
|
|
;;
|
|
|
|
|
|
|
|
*.html)
|
2013-03-24 01:08:48 +00:00
|
|
|
(ronn -5 $1 --pipe\
|
2013-03-24 00:43:47 +00:00
|
|
|
--style='print toc'\
|
2013-03-23 18:50:01 +00:00
|
|
|
--organization=1602\ Software\
|
2013-07-16 18:48:37 +00:00
|
|
|
--manual=LoopbackData &&\
|
2013-03-25 11:03:50 +00:00
|
|
|
cat docs/ga.html &&\
|
|
|
|
cat docs/footer.html) > $2
|
2013-03-23 18:50:01 +00:00
|
|
|
exit $?
|
|
|
|
;;
|
|
|
|
esac
|