3 # Copy XHTML files for the specified book(s) to a directory structure that's
4 # ready to be pushed to the public website.
10 # list-bookcodes-by-series.sh gs | xargs copy-xhtml.sh
12 if [ ! -d "$AONDIR" ]; then
13 >&2 echo "Please set the AONDIR environment variable"
18 if [ "$AONDIR" -ef "$CURR_DIR" ]; then
19 >&2 echo "Current directory is the same as AONDIR: giving up"
23 book_db="$AONDIR/common/sqlite/bookcodes.db"
27 row=($(sqlite3 -separator ' ' $book_db "select lang, series from bookcodes where book = '$book';"))
32 for format in xhtml xhtml-less-simple
34 source_dir="$AONDIR/$lang/$format/$series/$book"
35 output_dir="$CURR_DIR/$lang/$format/$series/$book"
36 mkdir -p "$output_dir"
37 cp -av "$source_dir"/* "$output_dir"
40 source_dir="$AONDIR/$lang/xhtml-simple/$series"
41 output_dir="$CURR_DIR/$lang/xhtml-simple/$series"
42 mkdir -p "$output_dir"
43 cp -av "$source_dir/$book".* "$output_dir"