From ab7e2f97fab70900deba309ee12d11ee798bfe67 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 20 Jun 2017 16:10:23 -0500 Subject: [PATCH] WIP move to makefile --- Makefile | 20 ++++++++++++++++++++ apps/neovim/init.vim | 2 +- readme.md | 5 ++++- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0ce7db --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +MAKEFILE_PATH ?= $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) +ALERT_AGREEMENT_FILE ?= "$(MAKEFILE_PATH)/.agreed-to-erasing-files.lock" + +default: install + +$(ALERT_AGREEMENT_FILE): + @echo -e "Running this script may delete existing personal configuration files.\n" \ + "Please view this script's source, fully understand it, and backup any\n" \ + "files before continuing.\n" \ + "Seriously. Like... entire directories. Just gone." + +# RESPONSE=$(shell bash -c 'read -r -p "Are you sure you want to continue? [y/N] "') +# @if [[ $response =~ ^(yes|y)$ ]]; then +# @echo "agreed" > "$ALERT_AGREEMENT_FILE" +# @else +# @exit 1 +# @fi + +install: $(ALERT_AGREEMENT_FILE) + @echo "Installed!" diff --git a/apps/neovim/init.vim b/apps/neovim/init.vim index 78003fd..ef0fb78 100644 --- a/apps/neovim/init.vim +++ b/apps/neovim/init.vim @@ -209,7 +209,7 @@ endfun autocmd BufWritePre,FileWritePre * :call AutoMakeDirectory() if !exists("g:make_args") - let g:make_args="run" + let g:make_args="default" endif fun! RunMake() split diff --git a/readme.md b/readme.md index f0c90ac..a366320 100644 --- a/readme.md +++ b/readme.md @@ -76,7 +76,10 @@ Here are some bullet points on my workflow as a Web Developer: ## To Do and Improvements -* Unify all the common variables... somehow? +* Unify all the common variables... somehow? (and use templates and `envsubst`?) +* Makefile as setup script +* Vim `m` binding should be able to run arbitrary commands, not just + `make` * Dunst and notifications * Vimux * urxvt reizing