Add fonts installation to setup script

This commit is contained in:
mr-vercetti 2022-09-01 15:25:45 +02:00
parent 79272f2b45
commit 7f9a815bf9
2 changed files with 34 additions and 1 deletions

View File

@ -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`.

View File

@ -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)"