personal-website/deploy-server

17 lines
1 KiB
Text
Raw Normal View History

2023-12-21 16:41:54 +01:00
#!/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'
2023-12-21 17:20:36 +01:00
find /srv/http/docs -type f -print0 | xargs -0 sed -i 's/http:\/\/assets.zdenekborovec-dev.cz\/common/https:\/\/assets.zdenekborovec.cz\/common/g'
2023-12-21 16:41:54 +01:00
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'
2023-12-21 17:20:36 +01:00
find /srv/http/assets -type f -print0 | xargs -0 sed -i 's/http:\/\/assets.zdenekborovec-dev.cz\/common/https:\/\/assets.zdenekborovec.cz\/common/g'
2023-12-21 16:41:54 +01:00
find /srv/http/assets -type f -print0 | xargs -0 sed -i 's/http:\/\/zdenekborovec-dev.cz/https:\/\/zdenekborovec.cz/g'