penguin/utils

my env utils

commit d0b06f42b94c2c140910f26a4bc0285b55c7969c

author斟酌 鵬兄 <tgckpg@gmail.com>
date2022-08-11T16:16:54Z
subjectCreate source dir only if not exist
commit d0b06f42b94c2c140910f26a4bc0285b55c7969c
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2022-08-11T16:16:54Z

    Create source dir only if not exist
---
 bash/bashrc/rbashrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bash/bashrc/rbashrc b/bash/bashrc/rbashrc
index 86ef26b..6341bea 100644
--- a/bash/bashrc/rbashrc
+++ b/bash/bashrc/rbashrc
@@ -24,8 +24,7 @@ if [ -f ~/.rbashenv ]; then
     . ~/.rbashenv
 fi
 
-mkdir -p "$RBASH_SOURCES"
-
+# The merged sources
 RBASH_MERGED="$RBASH_SOURCES/merged"
 
 # don't put duplicate lines or lines starting with space in the history.
@@ -114,6 +113,7 @@ function rbash_cache {
 _RBASH_LOADED=
 if [ ! -d "$RBASH_SOURCES" ]; then
 	_RBASH_MERGE_START=1
+	mkdir -p "$RBASH_SOURCES"
 fi
 
 function rbash_load {