scripts

Random scripts
git clone git://git.margiolis.net/scripts.git
Log | Files | Refs | README | LICENSE

docprev (239B)


      1 #!/bin/sh
      2 
      3 usage()
      4 {
      5 	echo "usage: ${0##*/} file" 1>&2 && exit 1
      6 }
      7 
      8 test ${#} -eq 0 && usage
      9 base="${1%.*}"
     10 ext="${1##*.}"
     11 
     12 case "${ext}" in
     13 	html) setsid -f "${BROWSER}" "${base}.html" ;;
     14 	tex|md) setsid -f xdg-open "${base}.pdf" ;;
     15 esac