From 58236edcea7386750f62fbcc4c9af050d78fe559 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Thu, 30 Jan 2020 12:33:48 -0300 Subject: [PATCH] Added an index (not automatically generated) and a publishing script --- index.html | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ publish.sh | 26 +++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 index.html create mode 100755 publish.sh diff --git a/index.html b/index.html new file mode 100644 index 0000000..1ba8c99 --- /dev/null +++ b/index.html @@ -0,0 +1,94 @@ + + + + + + Welcome to JulioBiason.Me + + + + +
+

Books.JulioBiason.Me

+
+ +

English

+ + + + diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..cb1297f --- /dev/null +++ b/publish.sh @@ -0,0 +1,26 @@ +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