16 lines
612 B
Bash
Executable File
16 lines
612 B
Bash
Executable File
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 -
|
|
}
|
|
|
|
|
|
#!/bin/bash
|
|
echo "Deployment script for repository \"web-deployment\"
|
|
`date`
|
|
=============================================================================="
|
|
|
|
rewrite_code %CONTENT_DIR% "\/common\/threadr"
|
|
|
|
echo "==============================================================================
|
|
Done."
|