mkdir only if variable is set
This commit is contained in:
parent
ab3884025f
commit
cb536cf219
1 changed files with 3 additions and 3 deletions
|
@ -63,9 +63,9 @@ if [[ $- = *i* ]] ; then
|
|||
export MYSHELLCONFIG_VIM_PLUGINS
|
||||
|
||||
# Create necessary directories
|
||||
mkdir -p "$SSH_AGENTS_DIR"
|
||||
mkdir -p "$SSH_AGENT_SOCKETS_DIR"
|
||||
mkdir -p "$MYSHELLCONFIG_LOGDIR"
|
||||
[ -n "${SSH_AGENTS_DIR-x}" ] && mkdir -p "$SSH_AGENTS_DIR"
|
||||
[ -n "${SSH_AGENT_SOCKETS_DIR-x}" ] && mkdir -p "$SSH_AGENT_SOCKETS_DIR"
|
||||
[ -n "${MYSHELLCONFIG_LOGDIR-x}" ] && mkdir -p "$MYSHELLCONFIG_LOGDIR"
|
||||
|
||||
cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
|
||||
------- start -------------- $(date) ---------------8<--
|
||||
|
|
Loading…
Reference in a new issue