From 8b29fc9f48b347d5c2ef9db813de15c8d59fee6f Mon Sep 17 00:00:00 2001 From: LinuxMint4Ever <> Date: Wed, 19 Feb 2020 03:54:48 +0100 Subject: [PATCH] added variable replacement command for %CONTENT_DIR% --- deployment-script.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployment-script.sh b/deployment-script.sh index 47ca89d..09ecfa0 100755 --- a/deployment-script.sh +++ b/deployment-script.sh @@ -3,5 +3,9 @@ echo "Deployment script for repository \"web-deployment\" `date` ==============================================================================" +echo "Replacing %CONTENT_DIR% in all HTML and PHP files." +CONTENT_DIR="/common/content" +echo -e "`find ./ -name '*.html' -or -name '*.php' | sed "s/^/workingfile=\'/;s/\$/\'\; cat \\\$workingfile > .\/tmpdeploymentfile\; cat tmpdeploymentfile | sed \'s#%CONTENT_DIR%#\$CONTENT_DIR#\' > \\\$workingfile/"`\nrm tmpdeploymentfile" + echo "============================================================================== Done."