aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2026-05-31 14:52:49 +0200
committerPhilip Wittamore <philip@wittamore.com>2026-05-31 14:52:49 +0200
commit71c3187503c96c686ec16d2cf44d985209effa43 (patch)
treeb1226f2571477fd9965057c26ac4c9b14862a388
parent77b8914d9f233321430f9a9a9947c52de9239a72 (diff)
update
-rwxr-xr-xblogsend15
1 files changed, 8 insertions, 7 deletions
diff --git a/blogsend b/blogsend
index 905857e..87eef3e 100755
--- a/blogsend
+++ b/blogsend
@@ -3,24 +3,25 @@
# blogsend
# folders
-localdir=~/web
+LOCALDIR=~/web
+REMOTEDIR=/srv/http/wittamore.fr
+# defined in ~/.ssh/config
+REMOTEHOST="soc"
# update git
echo "-- Updating git"
-cd $localdir || exit
+cd $LOCALDIR || exit
git add *
-git commit -m 'file update'
+git commit -m 'blog update'
git push origin master
# update remote http root
echo "-- Updating remote web root"
-ssh -q soc << EOF
-cd /srv/http/wittamore.fr || exit
+ssh -q "$REMOTEHOST" /bin/bash << EOF
+cd "${REMOTEDIR}" || exit
pwd
git pull
EOF
printf "Done.\n"
-exit 0
-