Mercurial > hg > freeDiameter
comparison contrib/PKI/ca_script2/Makefile @ 1551:2fe434590a8f
ca Makefile: portability improvements
use -f with ln -s to avoid errors
use printf instead of echo for portable \n
author | Luke Mewburn <luke@mewburn.net> |
---|---|
date | Wed, 08 Jul 2020 16:55:24 +1000 |
parents | 54c4d3e840ff |
children |
comparison
equal
deleted
inserted
replaced
1550:224cb55be2d7 | 1551:2fe434590a8f |
---|---|
23 # Default: print the help | 23 # Default: print the help |
24 all: help | 24 all: help |
25 | 25 |
26 # Help message | 26 # Help message |
27 help: | 27 help: |
28 @echo "\n\ | 28 @printf -- "\n\ |
29 Available commands:\n\ | 29 Available commands:\n\ |
30 make init topca=name\n\ | 30 make init topca=name\n\ |
31 Creates the initial top-level CA structure\n\ | 31 Creates the initial top-level CA structure\n\ |
32 make newca name=newcaname ca=parentca\n\ | 32 make newca name=newcaname ca=parentca\n\ |
33 Creates a new sub-CA that can be used for certificates later.\n\ | 33 Creates a new sub-CA that can be used for certificates later.\n\ |
170 # Regenerate the Certificate Revocation List. | 170 # Regenerate the Certificate Revocation List. |
171 gencrl: | 171 gencrl: |
172 @if [ -z "$(ca)" ]; then echo "Missing parameter. Ex: make gencrl ca=ca.testbed.aaa"; exit 1; fi | 172 @if [ -z "$(ca)" ]; then echo "Missing parameter. Ex: make gencrl ca=ca.testbed.aaa"; exit 1; fi |
173 # Create the CRL | 173 # Create the CRL |
174 @CA_ROOT_DIR=$(DATA_DIR)/$(ca) openssl ca $(CONFIG) -gencrl -out $(DATA_DIR)/$(ca)/public/crl/$(ca).pem | 174 @CA_ROOT_DIR=$(DATA_DIR)/$(ca) openssl ca $(CONFIG) -gencrl -out $(DATA_DIR)/$(ca)/public/crl/$(ca).pem |
175 @ln -s crl/$(ca).pem $(DATA_DIR)/$(ca)/public/local.pem | 175 @ln -f -s crl/$(ca).pem $(DATA_DIR)/$(ca)/public/local.pem |
176 @ln -s local.pem $(DATA_DIR)/$(ca)/public/`openssl crl -noout -hash < $(DATA_DIR)/$(ca)/public/crl/$(ca).pem`.r0 | 176 @ln -f -s local.pem $(DATA_DIR)/$(ca)/public/`openssl crl -noout -hash < $(DATA_DIR)/$(ca)/public/crl/$(ca).pem`.r0 |
177 | 177 |
178 # End of file... | 178 # End of file... |