All pastes #24930 Raw Edit

Unnamed

public text v1 · immutable
#24930 ·published 2005-10-08 13:48 UTC
rendered paste body
#! /bin/bash

PDFTOHTML="pdftohtml -q $1 /tmp/pdftohtml/ebook.html"
PDFNOTICE="echo -e \033[01;31mConverting:\033[01;33m $1 \033[00m"
ELINKS='elinks /tmp/pdftohtml/ebook.html'
RMDIR='rm -rf /tmp/pdftohtml'
RMNOTICE="echo -e \033[01;31mRemoving:\033[01;33m old cache... \033[00m"
MKDIR='mkdir /tmp/pdftohtml'

if test -d /tmp/pdftohtml;
 then 
  exec $RMNOTICE &  exec $RMDIR;
 fi;
if test -n '$1'; 
 then
  $MKDIR;
  # exec $PDFNOTICE &
  $PDFTOHTML && $ELINKS
  # && exec $RMDIR;
 else
  echo -e "\033[01;35mYou have to specify a PDF file...\033[00m"
fi;