Skip to content

Instantly share code, notes, and snippets.

@usernamenumber
Last active July 22, 2016 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usernamenumber/c215d25257fef1e74250c78a8a0f081d to your computer and use it in GitHub Desktop.
Save usernamenumber/c215d25257fef1e74250c78a8a0f081d to your computer and use it in GitHub Desktop.
#!/bin/bash
# Set these to your locations...
CSEDIR="~/Documents/Tunapanda/EconApp/Book/funzo-cse"
FUNZODIR="~/Documents/Tunapanda/EconApp/Book/funzo-app"
cd $CSEDIR &&
# Remove old content
rm -rf publish/* ;
rm -rf ${FUNZODIR}/public/content/books/CSE/ ;
# Generate processed html in ${CSEDIR}/sections
./scripts/process_html.py *.html &&
# Encrypt sections referenced in book.json into ${CSEDIR}/publish/SCHOONAME/BOOKNAME/...
FN=$(./scripts/encrypt.js book.json) &&
# Deploy to funzo
mv -v $FN ${FUNZODIR}/public/content/books/CSE/ &&
ls ${FUNZODIR}/public/content/books/CSE/ &&
cat ${FUNZODIR}/public/content/books/CSE/book.json &&
## Upload
#cd ${FUNZODIR}/public/content/books/CSE &&
#zip -r ../CSE.zip * &&
#rsync -aP ${FUNZODIR}/public/content/books/CSE.zip geekdome:/shared/tunapanda/funzo-app/dist/content/dl/CSE;
echo ""
echo "DONE"
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment