From 3e81516acb5730d42c831b82bb75f60611d1cd23 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 25 Jul 2018 21:12:59 -0300 Subject: Don't run locked_init by default --- bash/aliases.sh | 2 +- bash/init.sh | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'bash') 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 -- cgit v1.2.3