From 1904542c4b439611567af2a8b19e0586e1945a35 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Fri, 4 Nov 2011 11:29:26 -0600 Subject: [PATCH] Check that pt-collect exists before starting. --- bin/pt-stalk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/pt-stalk b/bin/pt-stalk index 21ea8e78..8af81e23 100755 --- a/bin/pt-stalk +++ b/bin/pt-stalk @@ -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"