summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 7a7e9ec0418a85acdbd39c78f9587d4e464b8e84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SOURCES=git-sonar sonar-base.sh prompt.zsh prompt.bash fetch.sh
PREFIX=$(HOME)/.local

all:
	@echo 'Simple Install script for *git-sonar* '
	@echo 'For a normal installation for your user only use:'
	@echo '    make install'
	@echo ''
	@echo 'If you want to install *git-sonar* system wide you should change'
	@echo 'the prefix'
	@echo ''
	@echo '    PREFIX=/usr/local/bin make install'
	@echo ''
	@echo 'For a development install (symlinking files) do:'
	@echo ''
	@echo '	make develop'

.PHONY: install develop

install: $(SOURCES)
	@echo 'Installing in ' $(PREFIX)/bin
	cp git-sonar $(PREFIX)/bin
	cp sonar-base.sh $(PREFIX)/bin
	cp prompt.zsh $(PREFIX)/bin
	cp prompt.bash $(PREFIX)/bin
	cp fetch.sh $(PREFIX)/bin


develop: $(SOURCES)
	@echo 'Symlinking in ' $(PREFIX)/bin
	ln -s $(PWD)/git-sonar $(PREFIX)/bin/git-sonar
	ln -s $(PWD)/sonar-base.sh $(PREFIX)/bin/sonar-base.sh
	ln -s $(PWD)/prompt.zsh $(PREFIX)/bin/prompt.zsh
	ln -s $(PWD)/prompt.bash $(PREFIX)/bin/prompt.bash
	ln -s $(PWD)/fetch.sh $(PREFIX)/bin/fetch.sh