diff --git a/deploy b/deploy deleted file mode 100755 index 9ccb611..0000000 --- a/deploy +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# Copy the docs and assets directories onto the server -cp -r docs /srv/http -cp -r assets /srv/http - -# Update the header css GET parameter -sed -i "s/TIMESTAMP/"$(date +%s)"/g" /srv/http/docs/common/header.php diff --git a/deploy-local b/deploy-local new file mode 100755 index 0000000..1a2952d --- /dev/null +++ b/deploy-local @@ -0,0 +1,16 @@ +#!/bin/sh + +# Copy the docs and assets directories onto the server +cp -r docs /srv/http +cp -r assets /srv/http + +# Update the header css GET parameter +sed -i "s/TIMESTAMP/"$(date +%s)"/g" /srv/http/docs/common/header.php + +# Replace localhost addresses with proper +find /srv/http/docs -type f -print0 | xargs -0 sed -i 's/https:\/\/www.zdenekborovec.cz/http:\/\/www.zdenekborovec-dev.cz/g' +find /srv/http/docs -type f -print0 | xargs -0 sed -i 's/https:\/\/assets.zdenekborovec.cz/http:\/\/assets.zdenekborovec-dev.cz/g' +find /srv/http/docs -type f -print0 | xargs -0 sed -i 's/https:\/\/zdenekborovec.cz/http:\/\/zdenekborovec-dev.cz/g' +find /srv/http/assets -type f -print0 | xargs -0 sed -i 's/https:\/\/www.zdenekborovec.cz/http:\/\/www.zdenekborovec-dev.cz/g' +find /srv/http/assets -type f -print0 | xargs -0 sed -i 's/https:\/\/assets.zdenekborovec.cz/http:\/\/assets.zdenekborovec-dev.cz/g' +find /srv/http/assets -type f -print0 | xargs -0 sed -i 's/https:\/\/zdenekborovec.cz/http:\/\/zdenekborovec-dev.cz/g' diff --git a/deploy-server b/deploy-server new file mode 100755 index 0000000..5b498eb --- /dev/null +++ b/deploy-server @@ -0,0 +1,16 @@ +#!/bin/sh + +# Copy the docs and assets directories onto the server +cp -r docs /srv/http +cp -r assets /srv/http + +# Update the header css GET parameter +sed -i "s/TIMESTAMP/"$(date +%s)"/g" /srv/http/docs/common/header.php + +# Replace localhost addresses with proper +find /srv/http/docs -type f -print0 | xargs -0 sed -i 's/http:\/\/www.zdenekborovec-dev.cz/https:\/\/www.zdenekborovec.cz/g' +find /srv/http/docs -type f -print0 | xargs -0 sed -i 's/http:\/\/assets.zdenekborovec-dev.cz/https:\/\/assets.zdenekborovec.cz/g' +find /srv/http/docs -type f -print0 | xargs -0 sed -i 's/http:\/\/zdenekborovec-dev.cz/https:\/\/zdenekborovec.cz/g' +find /srv/http/assets -type f -print0 | xargs -0 sed -i 's/http:\/\/www.zdenekborovec-dev.cz/https:\/\/www.zdenekborovec.cz/g' +find /srv/http/assets -type f -print0 | xargs -0 sed -i 's/http:\/\/assets.zdenekborovec-dev.cz/https:\/\/assets.zdenekborovec.cz/g' +find /srv/http/assets -type f -print0 | xargs -0 sed -i 's/http:\/\/zdenekborovec-dev.cz/https:\/\/zdenekborovec.cz/g'