diff --git a/README.md b/README.md index d9ab759..bac3994 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,9 @@ My simple dotfiles for bash and vim. ## Setup +### WSL 1. Install a font which supports [Powerline](https://github.com/powerline/powerline), I recommend [DroidSans Mono for Powerline](https://github.com/powerline/fonts/tree/master/DroidSansMono), but there are other cool ones too. -2. Run the `setup.sh` script. +2. Run `./setup.sh`. + +### Native Linux +1. Run `./setup.sh -f`. diff --git a/setup.sh b/setup.sh index 9bfa79a..13caf41 100755 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,23 @@ #!/bin/bash # Script installing oh-my-bash and dotfiles +print_usage () { + echo "Usage: "$0" [options...]" + echo "-f Install Powerline fonts" +} + +while getopts "fh" opt +do + case $opt in + f) + install_fonts="yes";; + h) + print_usage + exit 3 + ;; + esac +done + # Variables script_dir="$(cd "$(dirname ${BASH_SOURCE[0]})" && pwd)" @@ -10,6 +27,18 @@ old_dotfiles_dir="${home_dir}/old-dotfiles" dotfiles=(bashrc vimrc) + +# Install powerline fonts (for native Linux installation) +if [[ $install_fonts == "yes" ]]; then + echo "Installing powerline fonts..." + cd $script_dir + git clone https://github.com/powerline/fonts.git --depth=1 + cd fonts + ./install.sh + cd .. + rm -rf fonts +fi + # Install oh-my-bash bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"