summaryrefslogtreecommitdiffstats
path: root/sync.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sync.sh')
-rwxr-xr-xsync.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/sync.sh b/sync.sh
new file mode 100755
index 0000000..b2cd9e8
--- /dev/null
+++ b/sync.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+#Variables
+# -------------------------
+REMOTE="216.189.157.213"
+SRC="/home/vassilios/Sandbox/SolarDump-Puffy/public/"
+REPO="/home/vassilios/Sandbox/SolarDump-Puffy"
+DST="/var/www/htdocs/solardump"
+USERNAME="anoduck"
+
+hugo
+
+cd "$SRC" || return
+
+rg --files-with-matches --fixed-strings '<meta name="robots" content="noindex">' | xargs -I % sed -i '/<meta name="robots" content="noindex">/d' %
+
+cd "$REPO" || return
+
+# $SRC_PATH must be _closed_ and ends _with_ a "/".
+# $DST_PATH must be _open_ and ends _with_ _NO_ "/".
+rsync -azv -e ssh --delete "$SRC" "$USERNAME"@"$REMOTE":"$DST"