work on install method

main
czoczo 9 months ago
parent 1ebb891cb4
commit b664309509
  1. 9
      getbb.sh

@ -7,6 +7,12 @@ get_file() {
| sed '1,/^\r$/d' | sed '1,/^\r$/d'
} }
handle_inputrc() {
[ -f ~/.inputrc ] && touch ~/.inputrc
grep -q "BetterBash" ~/.inputrc || get_file /.inputrc >> ~/.inputrc && \
bind -f ~/.inputrc
}
DIR=~/.bb DIR=~/.bb
CMD=$(cat <<-END CMD=$(cat <<-END
# BetterBash # BetterBash
@ -17,6 +23,5 @@ END
mkdir -p $DIR && \ mkdir -p $DIR && \
get_file /prompt/bb.sh > $DIR/bb.sh && \ get_file /prompt/bb.sh > $DIR/bb.sh && \
get_file /prompt/git-prompt.sh > $DIR/git-prompt.sh && \ get_file /prompt/git-prompt.sh > $DIR/git-prompt.sh && \
grep -q "BetterBash" ~/.inputrc || get_file /.inputrc >> ~/.inputrc && \ handle_inputrc && \
bind -f ~/.inputrc && \
grep -q "BetterBash" ~/.bashrc || echo "$CMD" >> ~/.bashrc grep -q "BetterBash" ~/.bashrc || echo "$CMD" >> ~/.bashrc

Loading…
Cancel
Save