#!/bin/bash AK_TEMP="$(mktemp -d /tmp/aktmp-XXXXXXX)" PROGRAM="$(basename $0)" logit(){ ak-logthis "$PROGRAM" "$1" "$2" } if [ ! -d "$AK_TEMP" ] then logit "ERROR" "Could not make $AK_TEMP directory to work in" echo "Could not make $AK_TEMP directory to work in" exit 1 fi logit "INFO" "$AK_TEMP created successfully" echo "$AK_TEMP"