Skip to content

Commit 50bddcd

Browse files
authored
Merge pull request #28 from eribertomota/master
Add checks for dependencies
2 parents 6adcbf8 + 178244d commit 50bddcd

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

bookman

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ do
8585
done
8686
shift $(($OPTIND - 1))
8787

88+
# Check for dependencies
89+
groff -ms /dev/null || {
90+
printf "ERROR: You need install groff.\n" >&2
91+
exit 1
92+
}
93+
94+
ps2pdf 2>&1 | grep -q Usage || {
95+
printf "ERROR: You need install ghostscript.\n" >&2
96+
exit 1
97+
}
98+
8899
# Compatibility wrapper for BSD/GNU date, for parsing dates
89100
if date -j >/dev/null 2>&1; then
90101
pdate() { date -u -j -f '@%s' "$@"; }

0 commit comments

Comments
 (0)