commit 677346d3cc7cff156f2028d92f86326b1abb981e
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2022-08-11T16:07:57Z |
| subject | Fix upgrade not working properly |
commit 677346d3cc7cff156f2028d92f86326b1abb981e
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2022-08-11T16:07:57Z
Fix upgrade not working properly
---
bash/bashrc/rbashrc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/bash/bashrc/rbashrc b/bash/bashrc/rbashrc
index 1b04be6..180ad78 100644
--- a/bash/bashrc/rbashrc
+++ b/bash/bashrc/rbashrc
@@ -112,10 +112,14 @@ function rbash_cache {
}
_RBASH_LOADED=
+if [ ! -d "$RBASH_SOURCES" ]; then
+ _RBASH_MERGE_START=1
+fi
+
function rbash_load {
local f path
- if [ -z "$_RBASH_UPGRADE" ]; then
+ if [ -z "$_RBASH_MERGE_START" ]; then
if [ -n "$_RBASH_LOADED" ]; then
return 0
fi
@@ -173,9 +177,7 @@ function rbash-upgrade {
rm -r "$RBASH_SOURCES"
fi
- _RBASH_UPGRADE=1
source $__SCRIPT
- unset _RBASH_UPGRADE
}
function rbash-run {
@@ -286,6 +288,7 @@ rbash_load "sources/40_go-command"
rbash_load "sources/41_pivot-command"
___DEFAULT___
chmod 600 "$RBASH_CONFIG"
+ unset _RBASH_MERGE_START
fi
source "$RBASH_CONFIG"