2020-02-21 13:07:10 +01:00
|
|
|
function rewrite_code {
|
|
|
|
echo "Replacing $1 with $2 in all HTML and PHP files."
|
|
|
|
echo -e "`find ./ -name '*.html' -or -name '*.php' | sed "s/^/workingfile=\'/;s/\$/\'\; cat \\\$workingfile > .\/tmpdeploymentfile\; cat tmpdeploymentfile | sed \'s#$1#$2#\' > \\\$workingfile/"`\nrm tmpdeploymentfile" | bash -
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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`
|
|
|
|
=============================================================================="
|
2020-02-12 05:49:44 +01:00
|
|
|
|
2020-02-21 13:07:10 +01:00
|
|
|
rewrite_code %CONTENT_DIR% "\/common\/threadr"
|
2020-02-21 13:14:22 +01:00
|
|
|
rewrite_code %ENFORCE_IP% `cat enforce_ip.template`
|
|
|
|
|
2020-02-19 03:54:48 +01:00
|
|
|
|
2020-02-12 10:26:59 +01:00
|
|
|
echo "==============================================================================
|
|
|
|
Done."
|