changeset 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 224cb55be2d7
children 449b766ded50
files contrib/PKI/ca_script2/Makefile
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/PKI/ca_script2/Makefile	Tue Jul 07 12:50:52 2020 +1000
+++ b/contrib/PKI/ca_script2/Makefile	Wed Jul 08 16:55:24 2020 +1000
@@ -25,7 +25,7 @@
 
 # Help message
 help:
-	@echo "\n\
+	@printf -- "\n\
 Available commands:\n\
    make init topca=name\n\
        Creates the initial top-level CA structure\n\
@@ -172,7 +172,7 @@
 	@if [ -z "$(ca)" ]; then echo "Missing parameter. Ex: make gencrl ca=ca.testbed.aaa"; exit 1; fi
 	# Create the CRL
 	@CA_ROOT_DIR=$(DATA_DIR)/$(ca) openssl ca $(CONFIG) -gencrl -out $(DATA_DIR)/$(ca)/public/crl/$(ca).pem
-	@ln -s crl/$(ca).pem $(DATA_DIR)/$(ca)/public/local.pem
-	@ln -s local.pem $(DATA_DIR)/$(ca)/public/`openssl crl -noout -hash < $(DATA_DIR)/$(ca)/public/crl/$(ca).pem`.r0
+	@ln -f -s crl/$(ca).pem $(DATA_DIR)/$(ca)/public/local.pem
+	@ln -f -s local.pem $(DATA_DIR)/$(ca)/public/`openssl crl -noout -hash < $(DATA_DIR)/$(ca)/public/crl/$(ca).pem`.r0
 
 # End of file...
"Welcome to our mercurial repository"