open-pdf 331 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # -*- shell-script -*-
  3. if [ $# -lt 1 ] ; then
  4. echo "open-pdf file [ page-number ]"
  5. exit
  6. fi
  7. if [[ $# == 2 ]] ; then
  8. if [[ -e `which evince` ]] ; then
  9. evince -p $2 "$1"
  10. else
  11. xpdf $1 $2
  12. fi
  13. else
  14. if [[ -e `which evince` ]] ; then
  15. evince "$1"
  16. else
  17. xpdf $1
  18. fi
  19. fi