mirror of
https://github.com/mr-vercetti/dotfiles.git
synced 2025-01-18 11:25:35 +01:00
Add fonts installation to setup script
This commit is contained in:
parent
79272f2b45
commit
7f9a815bf9
@ -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`.
|
||||
|
29
setup.sh
29
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)"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user