Check that pt-collect exists before starting.

This commit is contained in:
Daniel Nichter
2011-11-04 11:29:26 -06:00
parent b2d2cf38f1
commit 1904542c4b

View File

@@ -99,6 +99,11 @@ log() {
echo "${1}" >&2
}
# Make sure pt-collect is executable before starting.
if [ ! -x $COLLECT ]; then
die "$COLLECT not found or not executable"
fi
# Make the collection location
mkdir -p "${DEST}" || die "Can't make the destination directory"
test -d "${DEST}" || die "${DEST} isn't a directory"