threadr.lostcave.ddnss.de/deployment-script.sh

12 lines
589 B
Bash
Raw Normal View History

2020-02-08 00:36:50 +01:00
#!/bin/bash
2020-02-12 10:26:59 +01:00
echo "Deployment script for repository \"web-deployment\"
`date`
=============================================================================="
echo "Replacing %CONTENT_DIR% in all HTML and PHP files."
2020-02-19 04:40:40 +01:00
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" | bash -
2020-02-12 10:26:59 +01:00
echo "==============================================================================
Done."