Books I wrote, published with MDBook.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
415 B

build_book() {
BOOK_PATH=$1
cd $BOOK_PATH
mdbook build
cd ..
}
publish_book() {
BOOK_PATH=$1
SOURCE=${BOOK_PATH}book/*
TARGET=$BOOK_PATH
echo "rsync -r $SOURCE books@books.juliobiason.me:$TARGET"
rsync -r $SOURCE books@books.juliobiason.me:$TARGET
}
publish_index() {
rsync index.html books@books.juliobiason.me:
}
for book in `ls -d */`; do
build_book $book
publish_book $book
publish_index
done