#!/bin/sh set -eu . tools/lib.sh D="$(mkdtemp)" R="$(mkdtemp)" trap 'rm -rf "$D" "$R"' EXIT cp -pR ./ "$R" cd "$R" { PATH="$D/usr/bin:$PATH" NODE_PATH="$D/usr/lib/node:$NODE_PATH" make -s DESTDIR="$D" install printf '%s: that the papo(3js) library is installed correctly...' \ "$(yellow "$0")" node -e 'require("papo");' printf ' %s\n' "$(green 'OK')" printf '%s: that the papo(1) command is installed correctly...' \ "$(yellow "$0")" papo -V | grep -q '^papo ' printf ' %s\n' "$(green 'OK')" } >&2