blob: 6ca1e66d924c024dd56314042aea778f42d7ecc5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/usr/bin/env bash
#
# Assembler
#
# Parameters
BASENAME="`basename $0 | sed -e 's/\(.\)/\U\1/'`"
DIRNAME="`dirname $0`"
BASEDIR="$DIRNAME/.."
SITE="site"
BOOK="book"
NOTEBOOK="notebook"
BUILD="build"
# Cleanup the previous build folder
rm -rf $BUILD
# Check if there's a site folder
if [ -e "$SITE" ]; then
cp -a $SITE $BUILD
if [ -e "$BOOK" ]; then
mv $BOOK $BUILD/book
fi
else
if [ -e "$BOOK" ]; then
mv $BOOK $BUILD
fi
fi
# Check if there's a notebook
if [ -e "$NOTEBOOK" ]; then
mv $NOTEBOOK $BUILD/notes
fi
# Move Atom feed
if [ -e "$BASEDIR/atom.xml" ]; then
mv $BASEDIR/atom.xml $BUILD
fi
# Move RSS feed
if [ -e "$BASEDIR/rss.xml" ]; then
mv $BASEDIR/rss.xml $BUILD
fi
|