diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-06-07 21:24:47 +0100 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-06-07 21:24:47 +0100 |
commit | f3b89d42e03a14385d1e32b7aa8450a2698ec076 (patch) | |
tree | c058e5cc1ba72027248656a6277fc8fd2b1bb069 /bin/assemble | |
parent | 08af902dbc822db1754d18339efc83985c65c3c3 (diff) | |
download | bookup-f3b89d42e03a14385d1e32b7aa8450a2698ec076.tar.gz bookup-f3b89d42e03a14385d1e32b7aa8450a2698ec076.tar.bz2 |
Feat: support for website and notebook
Diffstat (limited to 'bin/assemble')
-rwxr-xr-x | bin/assemble | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bin/assemble b/bin/assemble new file mode 100755 index 0000000..cd0836c --- /dev/null +++ b/bin/assemble @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Assembler +# + +# Parameters +BASENAME="`basename $0 | sed -e 's/\(.\)/\U\1/'`" +DIRNAME="`dirname $0`" +BASEDIR="$DIRNAME/.." +SITE="site" +NOTEBOOK="notebook" +PUBLIC="public" + +# Cleanup the previous public folder +rm -rf $PUBLIC + +# Check if there's a site folder +if [ -e "$SITE" ]; then + cp -a $SITE public + + if [ -e "compiled" ]; then + mv compiled public/book + fi +else + if [ -e "compiled" ]; then + mv compiled public + fi +fi + +# Check if there's a notebook +if [ -e "$NOTEBOOK" ]; then + mv $NOTEBOOK public/notes +fi |