Last active
June 26, 2019 02:27
-
-
Save NerdyDeedsLLC/f36d0dd3c6a3f45cdd536c280b0dfaa6 to your computer and use it in GitHub Desktop.
Automatic installer for powerline-status for BASH. Just run: $ curl -sL https://bit.ly/getpowerline | bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo " | |
╔═ auto-execute: curl -sL https://bit.ly/getpowerline | bash ══╗ | |
║ ║ | |
║ ╭─────────────────────────────────────────────────────╮ ║ | |
║ │ BASH PROMPT POWERLINE-STATUS AUTOMATIC INSTALLATION │ ║ | |
║ ╰─────────────────────────────────────────── v.1.0.0 ─╯ ║ | |
║ ║ | |
║ AUTHOR: @JJ (Nerdy Deeds, LLC) CREATED: 06.25.2019 ║ | |
║ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ╶ ║ | |
║ ║ | |
║ Install the amazingly-useful powerline-status prompt by ║ | |
║ executing a single (remote) command. Installs Python3 & ║ | |
║ pip3, installs the powerline-status package, then auto- ║ | |
║ configures your .bash_profile to load the prompt on the ║ | |
║ next shell instantiation. Remember to reload you shell! ║ | |
║ ║ | |
║ ║ | |
╚════════════════════╡ license: Free Use ╞═════════════════════J | |
" | |
echo "Checking for Python3... " && $([[ "$(which pip3)" == "" ]] && echo 'echo Installing...' && brew install python3 || echo 'echo Already installed.'); echo "Done." | |
echo "Checking for Powerline-Status... " && $([[ "$(pip3 show powerline-status)" == "" ]] && echo 'echo Installing...' && pip3 install powerline-status || echo 'echo Already installed.'); echo "Done." | |
echo 'Writing necessary lines to $HOME/.bash_profile...' | |
POWERLINE_PATH="$(pip3 show powerline-status | grep 'Location' | awk '{print $2}')" | |
echo " | |
# POWERLINE PROMPT ###################################################################### | |
# (Re)-install/Share this script (feel free): curl -sL https://bit.ly/getpowerline | bash | |
POWERLINE_PATH='${POWERLINE_PATH}' | |
powerline-daemon -q | |
POWERLINE_BASH_CONTINUATION=1 | |
POWERLINE_BASH_SELECT=1 | |
source \"${POWERLINE_PATH}/powerline/bindings/bash/powerline.sh\" | |
export POWERLINE_PATH | |
######################################################################################### | |
" >> ~/.bash_profile | |
echo 'Done. Be good, or be good at it!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment