commit a07f598305c3883fea271174c038f0dd07192985
parent de0e27536d3353a14e7e064bc26e415b42eb305b
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Mon, 17 Aug 2020 20:02:07 +0200

Minor stylistic changes

Diffstat:
Mdavup.sh | 2+-
Mdeploy-website.sh | 12++++++------
Mwebsite-backup.sh | 8++++----
3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/davup.sh b/davup.sh @@ -17,7 +17,7 @@ # Back up calendars and contacts from a DAV server (CalDAV and CardDAV). -domain="<DAV server domain" # example: https://dav.mailbox.org +domain="<DAV server domain" # example: https://dav.mailbox.org (no trailing "/") user="<username>" pass="<password>" diff --git a/deploy-website.sh b/deploy-website.sh @@ -24,12 +24,12 @@ WEB_PATH="/srv/oscarbenedito.com" # Pull rewritting history if needed, check that commit is PGP signed by a known # key and if so, rebuild the website -git -C $HUGO_PATH fetch origin master -git -C $HUGO_PATH reset --hard origin/master -git -C $HUGO_PATH verify-commit master || exit 1 -rm -rf $HUGO_PATH/public -rm -rf $HUGO_PATH/resources -hugo -s $HUGO_PATH --gc +git -C "$HUGO_PATH" fetch origin master +git -C "$HUGO_PATH" reset --hard origin/master +git -C "$HUGO_PATH" verify-commit master || exit 1 +rm -rf "$HUGO_PATH/public" +rm -rf "$HUGO_PATH/resources" +hugo -s "$HUGO_PATH" --gc # Edit Hugo output: delete unwanted files (also from sitemap) rm -rf "$HUGO_PATH/public/licenses/page/" diff --git a/website-backup.sh b/website-backup.sh @@ -31,10 +31,10 @@ error_message () { notify "$TITLE" "$MESSAGE" } -while IFS= read -r line +while read -r url file do - mkdir -p "$BACKUP_PATH/${line#* }" - OUTPUT="$BACKUP_PATH/${line#* }/$(date +"%Y-%m-%d")-${line#* }" - URL="${line% *}" + mkdir -p "$BACKUP_PATH/${file}" + OUTPUT="$BACKUP_PATH/${file}/$(date +"%Y-%m-%d")-${file}" + URL="${url}" save || error_message done < "$URL_FILE"