File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 1.1.2
2+ * [ #3 : Fix directory and symlink issue on OSX.] ( https://github.com/haensl/openssl-certgen/issues/3 )
3+ * Add option to overwrite existing version.
4+
15## 1.1.1
26* [ #1 : Only link manpage in makefile if directory exists.] ( https://github.com/haensl/openssl-certgen/issues/1 )
37* Change installation directories.
Original file line number Diff line number Diff line change 11src_dir := $(shell pwd)
2- bin_dir := /usr/bin
3- man_dir := /usr/share/man/man1
2+ platform := $(shell uname -o)
43bin := openssl-generate-certificates
4+ man := $(bin ) .1.gz
5+ THIS_FILE := $(lastword $(MAKEFILE_LIST ) )
6+ ifeq ($(platform ) ,Darwin)
7+ bin_dir := /usr/local/bin
8+ man_dir := /usr/local/share/man/man1
9+ else
10+ bin_dir := /usr/bin
11+ man_dir := /usr/share/man/man1
12+ endif
513
6- install :
14+ check_installed :
15+ @if [ -f $( bin_dir) /$( bin) ]; then echo " Another version of $( bin) is already installed. Execute 'make overwrite' to overwrite existing version." && exit 1 ; fi
16+
17+ install : check_installed
718 @if ! [ -f $( bin_dir) /$( bin) ]; then ln -s $(src_dir ) /$(bin ) $(bin_dir ) /$(bin ) ; fi
8- @if [ -d $( man_dir) ]; && ! [ -f $( man_dir) /$( bin) .1.gz ]; then ln -s $(src_dir ) /man/$(bin ) .1.gz $(man_dir ) /$(bin ) .1.gz ; fi
19+ @if [ -d $( man_dir) ] && ! [ -f $( man_dir) /$( man) ]; then ln -s $(src_dir ) /man/$(man ) $(man_dir ) /$(man ) ; fi
20+
21+ remove :
22+ @if [ -f $( bin_dir) /$( bin) ]; then rm $(bin_dir ) /$(bin ) ; fi
23+ @if [ -f $( man_dir) /$( man) ]; then rm $(man_dir ) /$(man ) ; fi
24+
25+ overwrite : remove
26+ @$(MAKE ) -f $(THIS_FILE ) install
You can’t perform that action at this time.
0 commit comments