Enhance output. Fix new file size check.
This commit is contained in:
11
convert.sh
11
convert.sh
@@ -43,8 +43,8 @@ function insert {
|
||||
|
||||
# Compile all the snippets into one Markdown file.
|
||||
function combine {
|
||||
logs "Combining documents based on parameters '`echo $@`'."
|
||||
ebook="$1.md"
|
||||
logs "Combining documents to create '$ebook'."
|
||||
shift
|
||||
for addition in "$@"; do
|
||||
insert "$addition" "$ebook"
|
||||
@@ -60,7 +60,7 @@ function convert {
|
||||
out_dir="$export_dir"
|
||||
ebook="${source//.md/.pdf}"
|
||||
|
||||
logs "Creating '$out_dir/$ebook' from '$source'."
|
||||
logs "Creating '$ebook' from '$source'."
|
||||
|
||||
book="${ebook//.pdf/-book.pdf}"
|
||||
booklet="${ebook//.pdf/-Booklet.pdf}"
|
||||
@@ -99,12 +99,11 @@ function convert {
|
||||
|
||||
## Cleanup ##
|
||||
|
||||
log "Clean PDFs"
|
||||
logs "Clean PDFs"
|
||||
echo "Old:"
|
||||
find "$DIR" -name "*".pdf -exec du -h {} \; -delete | sort -h
|
||||
find "$export_dir" -name "*".pdf -exec du -h {} \; -delete | sort -h
|
||||
|
||||
log "Clean working directory '$work_dir'"
|
||||
logs "Clean working directory '$work_dir'"
|
||||
if [[ -e "$work_dir" ]]; then
|
||||
rm -rv "$work_dir"
|
||||
fi
|
||||
@@ -145,7 +144,7 @@ convert "$name.md" "(Server Only)"
|
||||
cd "$DIR"
|
||||
|
||||
echo "New:"
|
||||
du -had1 *.pdf | sort -h
|
||||
find "$DIR" -name "*".pdf -exec du -h {} \; | sort -h
|
||||
|
||||
date
|
||||
|
||||
|
||||
Reference in New Issue
Block a user