#!/bin/sh
shout() { echo "$0: $@" >&2; }
barf() { shout "fatal: $@"; exit 111; }
safe() { "$@" || barf "cannot $@"; }

here=`env - PATH=$PATH pwd`
mypwd=${here%package}
mypwd=${mypwd%/}
home=`head -1 $mypwd/conf-home`

if [ -d ${home} ] 
then
  shout "Using directory ${home} for installation."
else
  safe mkdir -p ${home} &&
  shout "Using directory ${home} for installation."
fi 

exit 0
