From add12bb4afe149cdf6328ea314aafb03edf72418 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 2 Nov 2011 14:19:30 +0000 Subject: QPID-3573: handle case where /home/gordon does not exist git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1196597 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/examples/old_api/verify | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'qpid/cpp/examples/old_api/verify') diff --git a/qpid/cpp/examples/old_api/verify b/qpid/cpp/examples/old_api/verify index 9a1ed078d6..1ee21f6b03 100755 --- a/qpid/cpp/examples/old_api/verify +++ b/qpid/cpp/examples/old_api/verify @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one @@ -30,9 +30,16 @@ export LC_ALL=C # If $QPID_HOST or $QPID_PORT are set, use them to connect. # -QPID_DATA_DIR= QPID_NO_MODULE_DIR=1 -export QPID_DATA_DIR QPID_NO_MODULE_DIR +QPID_DATA_DIR= + +# Use temporary directory if $HOME does not exist +if [ ! -e "$HOME" ]; then + QPID_DATA_DIR=/tmp/qpid + QPID_PID_DIR=/tmp/qpid +fi + +export QPID_DATA_DIR QPID_NO_MODULE_DIR QPID_PID_DIR cleanup() { test -n "$QPIDD" && $QPIDD -q # Private broker -- cgit v1.2.1