forked from root/threadr.lostcave.ddnss.de
prepared deploymant script for better code replacement handling
parent
508d15d2d5
commit
9f9877b8b4
|
@ -1,11 +1,15 @@
|
|||
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`
|
||||
=============================================================================="
|
||||
|
||||
echo "Replacing %CONTENT_DIR% in all HTML and PHP files."
|
||||
CONTENT_DIR="\/common\/threadr"
|
||||
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 -
|
||||
rewrite_code %CONTENT_DIR% "\/common\/threadr"
|
||||
|
||||
echo "==============================================================================
|
||||
Done."
|
||||
|
|
Loading…
Reference in New Issue