added variable replacement command for %CONTENT_DIR%

master
LinuxMint4Ever 2020-02-19 03:54:48 +01:00
parent ad5722995d
commit 8b29fc9f48
1 changed files with 4 additions and 0 deletions

View File

@ -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."