From 6d1ebff3d5624f1c8565b04731925b8cc134f89d Mon Sep 17 00:00:00 2001 From: Bruno Tavares Date: Thu, 20 Mar 2014 19:06:30 -0300 Subject: [PATCH] Create make install --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index f87bae4..9493d78 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ SHELL:=/bin/bash VERSION=0.0.1 +PREFIX?=/usr/local +INSTALL_BIN=$(PREFIX)/bin +KICKSTART_LOCATION=$(PREFIX)/share/kickstart + deb: clean fpm -s dir -t deb -n kickstart \ -x usr/local/share/kickstart/.baseline \ @@ -17,3 +21,10 @@ deb: clean clean: rm *.deb 2>/dev/null || true + +install: + mkdir -p $(KICKSTART_LOCATION) + rsync -r * $(KICKSTART_LOCATION) + $(RM) $(INSTALL_BIN)/kickstart || true + mkdir -p $(INSTALL_BIN) + ln -s $(KICKSTART_LOCATION)/bin/kickstart $(INSTALL_BIN)/kickstart