#!/bin/bash
#convert PDF -> DjVU
#by ManyRoads http://eirenicon.org

OLDIFS=”$IFS”
IFS=$’\n’

for PDF in “$@”; do
FILE=”${PDF%.*}”
echo “Which pages ? e.g. type: 1-6, for all pages, press ENTER”
read pages
if [ -n “$pages” ]; then
pdf2djvu -o “$FILE”.djvu “$PDF” –pages=$pages
else
pdf2djvu -o “$FILE”.djvu “$PDF”
fi
done

IFS=”$OLDIFS”
read -s -n 1 -p “Press any key to close . . .”