commit e2c6806e610ddfebba81ce39863da69b3b66bd76 parent 8b320b6d1c979ab616890f98a499447e028e6d79 Author: Alex Balgavy <a.balgavy@gmail.com> Date: Thu, 3 Sep 2020 12:08:25 +0200 upsite: upload zola-generated HTML to my VPS Mainly because I can never remember the flags for rsync. Former-commit-id: 8fddbb928928d2373933f2475603ed60ce28b032 Diffstat:
A | scripts/upsite | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/scripts/upsite b/scripts/upsite @@ -0,0 +1,16 @@ +#!/bin/sh +[ -d public ] || { echo "No public/ folder present" && exit 1; } +destdir=/var/www/"$(basename "$(pwd)")" + +printf "Upload public/ to vps:%s? [Y/n] " "$destdir" +read -r conf +case "$conf" in + Y|y|Yes|yes) + ;; + *) + echo "User cancelled." + exit 0 + ;; +esac + +rsync -mrvzhLuP --del public/ vps:"$destdir"