From cf61e3239a9c0ccd16eab2507ed9cf46bc7b1133 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 12 Dec 2023 20:51:45 -0800 Subject: Fix Removing leading `/' from member names' warning This should stop an unnecessary cron warning e-mail. --- modules/blog/templates/backup_blog-files.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/blog/templates/backup_blog-files.sh') diff --git a/modules/blog/templates/backup_blog-files.sh b/modules/blog/templates/backup_blog-files.sh index 45b4dc42..e268ad2b 100755 --- a/modules/blog/templates/backup_blog-files.sh +++ b/modules/blog/templates/backup_blog-files.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Initialization PATH_TO_FILE=${PATH_TO_FILE:-<%= blog_files_backupdir %>} @@ -11,7 +11,8 @@ do then /bin/mkdir $PATH_TO_FILE/$locale fi - tar Jcf $PATH_TO_FILE/$locale/$locale-$COUNT.tar.xz <%= blog_location %>/$locale + # use relative paths to avoid "Removing leading `/' from member names'" warning + tar -C / -Jcf "$PATH_TO_FILE/$locale/$locale-$COUNT.tar.xz" "$(sed s,^/,, <<< "<%= blog_location %>/$locale")" done # Check count file to have a week of backup in the directory if [ $COUNT -ne 6 ] -- cgit v1.2.1