Skip to content

Commit

Permalink
Merge pull request #28 from eribertomota/master
Browse files Browse the repository at this point in the history
Add checks for dependencies
  • Loading branch information
mvertes authored Jun 28, 2020
2 parents 6adcbf8 + 178244d commit 50bddcd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bookman
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ do
done
shift $(($OPTIND - 1))

# Check for dependencies
groff -ms /dev/null || {
printf "ERROR: You need install groff.\n" >&2
exit 1
}

ps2pdf 2>&1 | grep -q Usage || {
printf "ERROR: You need install ghostscript.\n" >&2
exit 1
}

# Compatibility wrapper for BSD/GNU date, for parsing dates
if date -j >/dev/null 2>&1; then
pdate() { date -u -j -f '@%s' "$@"; }
Expand Down

0 comments on commit 50bddcd

Please sign in to comment.