dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit 5d6f4947b23b22403b3c5e44db016d711722b9a0
parent 691b36528df32e5f07868927da39533fc7537e70
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Sat, 27 Feb 2016 17:50:27 -0500

Added Makefile

Diffstat:
Makefile | 39+++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -0,0 +1,39 @@ +#!/usr/bin/make + +CONFIG_DIR = $(HOME)/.config +NPM_PACKAGES_DIR = $(HOME)/.npm-packages + + +nothing: + @echo "Give me something to make." + + +all: config dothome npm + + +config: + @mkdir -p $(CONFIG_DIR) + for file in $(shell ls .config); do \ + ln -sfn $$(echo $$(pwd)/.config/$$file) $(CONFIG_DIR)/$$file; \ + done + + +# adapted from https://github.com/jfrazelle/dotfiles/blob/master/Makefile +dothome: + for file in $(shell find . -maxdepth 1 -name ".*" -not -name "." \ + -not -name "*~" \ + -not -name ".gitignore" \ + -not -name ".git" \ + -not -name ".config"); do \ + f=$$(basename $$file); \ + ln -sfn $$(echo $$(pwd)/$$f) $(HOME)/$$f; \ + done + + +npm: + @mkdir -p $(NPM_PACKAGES_DIR) + @echo "prefix = $(NPM_PACKAGES_DIR)" > $(HOME)/.npmrc + + + +.PHONY: dothome npm config