3 # Copy ebook files for the specified book(s) to a directory structure that's
4 # ready to be pushed to the public website.
8 # copy-ebooks.sh 05sots
10 # list-bookcodes-by-series.sh gs | xargs copy-ebooks.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 BASE_DIR="$AONDIR/common/epub"
27 row=( $($AONDIR/common/scripts/list-book-info.sh $book) )
32 source_dir="$BASE_DIR/$book"
34 for format in epub mobi fb2 pdb lrf
36 output_dir="$CURR_DIR/$lang/$format/$series"
37 mkdir -p "$output_dir"
38 cp -av "$source_dir/$book.$format" "$output_dir"