From 49baf42cff246ae9bc96baab66b9233003eb9bb0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 25 Jun 2017 14:29:08 +1200 Subject: Add install-conf target Allows you to have a ~/.dotfiles.conf specifying targets to run in addition to `install`, e.g. `install-tmux` for applicable machines. Won't document this one just yet. --- ISSUES.markdown | 1 + Makefile | 3 +++ install/install-conf.sh | 10 ++++++++++ 3 files changed, 14 insertions(+) create mode 100644 install/install-conf.sh diff --git a/ISSUES.markdown b/ISSUES.markdown index a69e07df..7dcaa770 100644 --- a/ISSUES.markdown +++ b/ISSUES.markdown @@ -23,3 +23,4 @@ Known issues my own stuff in there * Completion for custom functions e.g. `sd` should ideally respect `completion-ignore-case` setting +* Document `install-conf` target once I'm sure it's not a dumb idea diff --git a/Makefile b/Makefile index d28bf613..1a2cc44c 100644 --- a/Makefile +++ b/Makefile @@ -315,6 +315,9 @@ install: install-bin \ install-readline \ install-vim +install-conf: + sh install/install-conf.sh + install-abook: mkdir -p -- $(HOME)/.abook cp -p -- abook/abookrc $(HOME)/.abook diff --git a/install/install-conf.sh b/install/install-conf.sh new file mode 100644 index 00000000..f50cde73 --- /dev/null +++ b/install/install-conf.sh @@ -0,0 +1,10 @@ +# Read extra targets from an optional ~/.dotfiles.conf file +if [ -e "$HOME"/.dotfiles.conf ] ; then + while read -r line ; do + case $line in + '#'*|'') ;; + *) set -- "$@" "$line" ;; + esac + done < "$HOME"/.dotfiles.conf +fi +make install "$@" -- cgit v1.2.3