1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-10-06 12:01:39 +00:00
pdf2htmlEX/bin/pdf2htmlEX
2012-08-10 23:40:57 +08:00

27 lines
551 B
Bash
Executable File

#!/bin/bash
set -e
TMPDIR=/tmp/pdf2htmlEX
# prepare the temporary directory
test -d $TMPDIR || mkdir -p $TMPDIR
rm -f $TMPDIR/* 2>/dev/null
# 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 $*
if [ -f $TMPDIR/convert.pe ]; then
echo -n "Converting fonts: "
fontforge -script $TMPDIR/convert.pe 2>/dev/null
echo "."
fi
#clean
#rm -f $TMPDIR/* 2>/dev/null
echo "Done."