2012-08-04 18:03:53 +00:00
|
|
|
#!/bin/bash
|
2012-08-06 18:13:54 +00:00
|
|
|
set -e
|
|
|
|
|
2012-08-10 13:41:24 +00:00
|
|
|
TMPDIR=/tmp/pdf2htmlEX
|
|
|
|
|
|
|
|
# prepare the temporary directory
|
|
|
|
test -d $TMPDIR || mkdir -p $TMPDIR
|
|
|
|
rm -f $TMPDIR/* 2>/dev/null
|
|
|
|
|
2012-08-04 18:03:53 +00:00
|
|
|
# Get directory of the script
|
|
|
|
SOURCE="${BASH_SOURCE[0]}"
|
|
|
|
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
|
|
|
SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"/
|
|
|
|
# Execute
|
|
|
|
${SCRIPT_DIR}/pdftohtmlEX $*
|
|
|
|
|
2012-08-10 13:41:24 +00:00
|
|
|
if [ -f $TMPDIR/convert.pe ]; then
|
2012-08-08 08:01:09 +00:00
|
|
|
echo -n "Converting fonts: "
|
2012-08-10 13:41:24 +00:00
|
|
|
fontforge -script $TMPDIR/convert.pe 2>/dev/null
|
2012-08-08 08:01:09 +00:00
|
|
|
echo "."
|
|
|
|
fi
|
2012-08-06 17:52:31 +00:00
|
|
|
|
2012-08-10 13:41:24 +00:00
|
|
|
#clean
|
|
|
|
rm -f $TMPDIR/* 2>/dev/null
|
2012-08-09 17:16:04 +00:00
|
|
|
|
2012-08-06 17:52:31 +00:00
|
|
|
echo "Done."
|