Create makefile to replace dotbot functionality
This commit is contained in:
parent
3ce031be9f
commit
c9a7b93c17
3 changed files with 60 additions and 5 deletions
55
makefile
Normal file
55
makefile
Normal file
|
@ -0,0 +1,55 @@
|
|||
# Makefile for Niblock Dotfiles
|
||||
|
||||
.PHONY: help \
|
||||
link-dotfiles \
|
||||
build-default \
|
||||
build-simple \
|
||||
install-vim-config \
|
||||
install-vim-plugin \
|
||||
install-git \
|
||||
install-tmux \
|
||||
install-bash-config \
|
||||
install-bash-profile \
|
||||
install-irssi
|
||||
|
||||
.DEFAULT-GOAL := help
|
||||
|
||||
help: ## Display this menu
|
||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
||||
awk 'BEGIN {FS = ":.*?## "}; {printf "%-25s %s\n", $$1, $$2}'
|
||||
|
||||
link-dotfiles: ## Create dotfiles link in Home directory
|
||||
ln -s -- "$(CURDIR)" "$(HOME)"/.dotfiles/
|
||||
|
||||
build-default: ## Create default environment, using all dotfiles
|
||||
build-default: link-dotfiles \
|
||||
install-vim-config \
|
||||
install-vim-plugin \
|
||||
install-git \
|
||||
install-tmux \
|
||||
install-bash-config \
|
||||
install-bash-profile \
|
||||
install-irssi
|
||||
|
||||
build-simple: ## Create minimal environment, for remote or single-use
|
||||
build-simple: install-vim-config \
|
||||
install-bash-profile
|
||||
|
||||
install-vim-config: ## Create vimrc file in Home directory
|
||||
ln -s -- "$(CURDIR)"/vim/vimrc "$(HOME)"/.vimrc
|
||||
|
||||
install-vim-plugin: ## Create vimrc-plugins (Plugin file) in Home directory
|
||||
ln -s -- "$(CURDIR)"/vim/vimrc-plugins "$(HOME)"/.vimrc-plugins
|
||||
|
||||
install-git: ## Create git config and ignore files in Home directory
|
||||
ln -s -- "$(CURDIR)"/git/gitconfig "$(HOME)"/.gitconfig
|
||||
ln -s -- "$(CURDIR)"/git/gitignore "$(HOME)"/.gitignore
|
||||
|
||||
install-tmux: ## Create tmux config file in Home directory
|
||||
ln -s -- "$(CURDIR)"/tmux/tmux.config "$(HOME)"/.tmux.config
|
||||
|
||||
install-bash-config: ## Create bash config file in Home directory
|
||||
|
||||
install-bash-profile: ## Cretae bash profile file in Home directory
|
||||
|
||||
install-irssi: ## Create irssi directory and file in Home directory
|
10
vim/vimrc
10
vim/vimrc
|
@ -37,7 +37,7 @@ set softtabstop=5
|
|||
" Set width; word wrap; scroll mods
|
||||
set scrolloff=5
|
||||
set tw=80
|
||||
set colorcolumn=80
|
||||
" set colorcolumn=80
|
||||
set wrap
|
||||
|
||||
" Enable auto-completion for vim commands
|
||||
|
@ -61,9 +61,9 @@ colorscheme desert
|
|||
" runtime bundle/vim-pathogen/autoload/pathogen.vim
|
||||
" execute pathogen#infect()
|
||||
|
||||
" New Way: Vim-Plug, add-ons configured in .vimrc.bundles
|
||||
if filereadable(expand("~/.vimrc.bundles"))
|
||||
source ~/.vimrc.bundles
|
||||
" New Way: Vim-Plug, add-ons configured in .vimrc-plugins
|
||||
if filereadable(expand("~/.vimrc-plugins"))
|
||||
source ~/.vimrc-plugins
|
||||
endif
|
||||
|
||||
"######
|
||||
|
@ -91,7 +91,7 @@ nnoremap <silent> <leader>h :set nohlsearch!<CR>
|
|||
" Edit dotfiles with <leader>d
|
||||
" v is for vim
|
||||
nnoremap <silent> <leader>dv :tabnew ~/.dotfiles/vim/vimrc<CR>
|
||||
nnoremap <silent> <leader>dp :tabnew ~/.dotfiles/vim/vimrc.bundles<CR>
|
||||
nnoremap <silent> <leader>dp :tabnew ~/.dotfiles/vim/vimrc-plugins<CR>
|
||||
" b is for bash
|
||||
" nnoremap <silent> <leader>db :tabnew ~/.dotfiles/bash/bashrc<CR>
|
||||
" t is for tmux
|
||||
|
|
Loading…
Reference in a new issue