#!/bin/bash

# try to obtain a temp dir unique to the user, to enable
# instantOS xsessions for concurrent users on the same machine

if [ -z "${XDG_RUNTIME_DIR}" ]; then
    RTD=/tmp/${UID}/instantos
else
    RTD=${XDG_RUNTIME_DIR}/instantos
fi

[[ -d "${RTD}" ]] || mkdir -p "${RTD}"

echo "$RTD"
