diff options
| author | EuAndreh <eu@euandre.org> | 2020-12-03 13:44:25 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2020-12-03 14:04:13 -0300 |
| commit | 84f8132c1043376f34a8f7fee70e26fab739cff2 (patch) | |
| tree | 4960b4b0e962d237980e36427ef6f97bf3ed4824 /bash | |
| parent | aliases.sh: Use c executable over alias to work with entr (diff) | |
| download | dotfiles-84f8132c1043376f34a8f7fee70e26fab739cff2.tar.gz dotfiles-84f8132c1043376f34a8f7fee70e26fab739cff2.tar.xz | |
Move fake-symlinks.sh loading to rr alias, create reload.sh
Diffstat (limited to 'bash')
| -rw-r--r-- | bash/aliases.sh | 5 | ||||
| -rw-r--r-- | bash/bashrc.sh | 9 | ||||
| -rw-r--r-- | bash/init.sh | 24 | ||||
| -rw-r--r-- | bash/mr-execute.sh | 17 | ||||
| -rw-r--r-- | bash/reload.sh | 8 | ||||
| -rw-r--r-- | bash/tests.sh | 3 |
6 files changed, 30 insertions, 36 deletions
diff --git a/bash/aliases.sh b/bash/aliases.sh index 4e0a8f9f..1a66e406 100644 --- a/bash/aliases.sh +++ b/bash/aliases.sh @@ -30,9 +30,8 @@ u() { } export -f u - -alias reload="locked_init && source $DOTFILES/bash/x.sh; source $DOTFILES/bash/tests.sh && source ~/.bashrc" -alias rr="locked_init && source $DOTFILES/bash/x.sh; source $DOTFILES/bash/tests.sh && source ~/.bashrc" +alias reload="source $DOTFILES/bash/reload.sh" +alias rr="source $DOTFILES/bash/reload.sh" alias r="source ~/.bashrc" alias ag="ag --hidden" diff --git a/bash/bashrc.sh b/bash/bashrc.sh index 3b58a3fb..c3fa2cbd 100644 --- a/bash/bashrc.sh +++ b/bash/bashrc.sh @@ -1,23 +1,20 @@ #!/usr/bin/env bash # shellcheck disable=SC1090 -# shellcheck disable=SC2086 export DOTFILES=~/dev/libre/dotfiles source $DOTFILES/bash/config.sh source $DOTFILES/bash/env.sh -source $GUIX_PROFILE/etc/profile +source "$GUIX_PROFILE/etc/profile" source $DOTFILES/bash/colors.sh source $DOTFILES/bash/ps1.sh source $DOTFILES/bash/aliases.sh source $DOTFILES/bash/util.sh source $DOTFILES/bash/agents.sh -source $DOTFILES/bash/init.sh source $DOTFILES/bash/symlinks.sh source $DOTFILES/bash/youtube.sh -source $HOME/annex/bin/misc/env.sh -source $HOME/.nurc -source $DOTFILES/bash/fake-symlinks.sh +source "$HOME/annex/bin/misc/env.sh" +source "$HOME/.nurc" env > ~/.spacemacs.env declare -px > ~/.bash.env diff --git a/bash/init.sh b/bash/init.sh deleted file mode 100644 index f14f9553..00000000 --- a/bash/init.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -locked_init() { - pushd ~/ > /dev/null || exit 1 - - mkdir -p ~/.emacs.d/.cache/ - AUTOJUMP_TXT="$HOME/.local/share/autojump/autojump.txt" - mkdir -p "$(dirname "$AUTOJUMP_TXT")" - touch "$AUTOJUMP_TXT" - - # clone all missing repos - mr checkout > /dev/null - - printf "" > /tmp/mr-repos - mr inject > /dev/null - - printf "(\\n" > /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 || exit 1 -} -export -f locked_init diff --git a/bash/mr-execute.sh b/bash/mr-execute.sh new file mode 100644 index 00000000..fd2112e7 --- /dev/null +++ b/bash/mr-execute.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +pushd ~/ > /dev/null || exit 1 + +AUTOJUMP_TXT="$HOME/.local/share/autojump/autojump.txt" +mkdir -p "$(dirname "$AUTOJUMP_TXT")" +touch "$AUTOJUMP_TXT" + +mr checkout > /dev/null + +mkdir -p ~/.emacs.d/.cache/ +(mr inject2 3>&2 2>&1 1>&3) 2>/dev/null | \ + sed -E 's/\/home\/andreh/~/' | \ + awk '{print "\""$1"/""\""}' | \ + cat <(printf "(\\n") - <(printf ")") > ~/.emacs.d/.cache/projectile-bookmarks.eld + +popd > /dev/null || exit 1 diff --git a/bash/reload.sh b/bash/reload.sh new file mode 100644 index 00000000..98bd73ad --- /dev/null +++ b/bash/reload.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# shellcheck disable=SC1090 + +source ~/.bashrc +source "$DOTFILES/bash/x.sh" +source "$DOTFILES/bash/mr-execute.sh" +source "$DOTFILES/bash/fake-symlinks.sh" +source ~/annex/bin/misc/tmuxinator-templates.sh diff --git a/bash/tests.sh b/bash/tests.sh deleted file mode 100644 index 69416149..00000000 --- a/bash/tests.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -# autotime test > /dev/null |
