17 lines
296 B
Bash
17 lines
296 B
Bash
set -e
|
|
|
|
base="$1"
|
|
|
|
TMPDIR="$ROOT_TMPDIR/$base"
|
|
XDG_RUNTIME_DIR="$TMPDIR/.run"
|
|
XDG_DATA_HOME="$TMPDIR/.data"
|
|
|
|
mkdir -p "$TMPDIR" "$XDG_RUNTIME_DIR" "$XDG_DATA_HOME"
|
|
|
|
cat <<EOF
|
|
export TMPDIR="$TMPDIR"
|
|
export XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR"
|
|
export XDG_DATA_HOME="$XDG_DATA_HOME"
|
|
cd "$TMPDIR"
|
|
EOF
|