#!/usr/bin/bash
#
# Prepare Downloads directory.

set -eu

HDIRS='/home/'

if [[ ! -d "$HDIRS/$PAM_USER/Downloads" ]] && [[ ! "$PAM_USER" =~ ^L_ ]] && \
       [[ ! "$PAM_USER" =~ ansible ]] ; then
    mkdir --mode=0777 "$HDIRS/$PAM_USER/Downloads"
fi
