Skip to content

Instantly share code, notes, and snippets.

@ericbaranowski
Forked from onedomain/bashit.sh
Last active June 10, 2019 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericbaranowski/11c4e71bd1ce954cf1eb03f7095a4a79 to your computer and use it in GitHub Desktop.
Save ericbaranowski/11c4e71bd1ce954cf1eb03f7095a4a79 to your computer and use it in GitHub Desktop.
#!/bin/bash
git clone -q https://github.com/akinomyoga/ble.sh.git $HOME/ble.sh
git clone -q --depth=1 https://github.com/Bash-it/bash-it.git $HOME/.bash_it
echo 'installing bash-it...'
$HOME/.bash_it/install.sh --silent
sleep 1
echo 'installing ble.sh...'
make --quiet -C $HOME/ble.sh
mv $HOME/ble.sh/out $HOME/.bash_it && rm -rf $HOME/ble.sh
sleep 1
echo 'updating .bashrc...'
sed -i -e 's/^source \"\$BASH\_IT\"\/bash\_it\.sh//g' $HOME/.bashrc
echo '' >> $HOME/.bashrc
echo '# initializing ble.sh before bash-it...' >> $HOME/.bashrc
echo '[[ $- == *i* ]] || return 0' >> $HOME/.bashrc
echo 'source $HOME/.bash_it/out/ble.sh --noattach' >> $HOME/.bashrc
echo '' >> $HOME/.bashrc
echo '# user settings...' >> $HOME/.bashrc
echo 'source "$BASH_IT"/bash_it.sh' >> $HOME/.bashrc
echo '((_ble_bash)) && ble-attach' >> $HOME/.bashrc
source $HOME/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment