diff options
-rw-r--r-- | bash/aliases.sh | 2 | ||||
-rw-r--r-- | bash/init.sh | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/bash/aliases.sh b/bash/aliases.sh index f18cbe2..cd1d17e 100644 --- a/bash/aliases.sh +++ b/bash/aliases.sh @@ -36,4 +36,4 @@ alias ,s="git status" alias ,d="git diff" alias ,ds="git diff --staged" -alias ,r="source ~/.bashrc" +alias ,r="locked_init && source ~/.bashrc" diff --git a/bash/init.sh b/bash/init.sh index 981f20c..5c70918 100644 --- a/bash/init.sh +++ b/bash/init.sh @@ -14,22 +14,22 @@ locked_init() { mr inject > /dev/null printf "(\n" > /tmp/mr-projectile - sed -E 's/\/home\/andreh/~/' /tmp/mr-repos | awk '{print "\""$1"\""}' >> /tmp/mr-projectile + sed -E 's/\/home\/andreh/~/' /tmp/mr-repos | awk '{print "\""$1"/""\""}' >> /tmp/mr-projectile printf ")" >> /tmp/mr-projectile cp /tmp/mr-projectile ~/.emacs.d/.cache/projectile-bookmarks.eld popd > /dev/null } - -touch /tmp/mr-lock -exec 221>/tmp/mr-lock -flock -n -e 221 && { - locked_init -} || { - printf "" # noop: couldn't acquire lock -} export -f locked_init +# touch /tmp/mr-lock +# exec 221>/tmp/mr-lock +# flock -n -e 221 && { +# locked_init +# } || { +# printf "" # noop: couldn't acquire lock +# } + # Tests pushd $DOTFILES > /dev/null |