fix tar param wg. macOS
This commit is contained in:
1 parent
c5648a9694
commit
56f7e63f9e
3 files changed
+23
-6
No files matched your search
+6
-4
@@ -456,7 +456,7 @@ backup_all_dirs() {
|
||||
#
|
||||
# $1 - Pfad zum Verzeichnis, das gesichert werden soll
|
||||
# $2 - Zielpfad und -name für das Archiv
|
||||
# $2 - zu sicherndes Verzeichnis
|
||||
# $3 - zu sicherndes Verzeichnis
|
||||
#
|
||||
# returns 0 for success, 1 otherwise
|
||||
#
|
||||
@@ -482,7 +482,7 @@ backup_directory() {
|
||||
#
|
||||
# $1 - Pfad zum Verzeichnis, das gesichert werden soll
|
||||
# $2 - Zielpfad und -name für das Archiv
|
||||
# $2 - zu sicherndes Verzeichnis
|
||||
# $3 - zu sicherndes Verzeichnis
|
||||
#
|
||||
# returns 0 for success, 1 otherwise
|
||||
#
|
||||
@@ -492,11 +492,13 @@ tar_dir() {
|
||||
local archive=$2
|
||||
local dir=$3
|
||||
local sort=--sort=name
|
||||
local tar_warn=--warning=no-file-ignored
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
sort=""
|
||||
tar_warn=""
|
||||
fi
|
||||
log $DEBUG "$DBG > tar -c -z --warning=\"no-file-ignored\" --numeric-owner --one-file-system $sort --exclude \"@eaDir\" -C \"$root\" \"$dir\" | gpg --batch -c --passphrase xxxx -o \"$archive\""
|
||||
tar -c -z --warning="no-file-ignored" --numeric-owner --one-file-system $sort --exclude "@eaDir" -C "$root" "$dir" 2>>$LOG_FILE | gpg --batch -c --passphrase $PASSPHRASE -o "$archive" 2>>$LOG_FILE
|
||||
log $DEBUG "$DBG > tar -c -z $tar_warn --numeric-owner --one-file-system $sort --exclude \"@eaDir\" -C \"$root\" \"$dir\" | gpg --batch -c --passphrase xxxx -o \"$archive\""
|
||||
tar -c -z $tar_warn --numeric-owner --one-file-system $sort --exclude "@eaDir" -C "$root" "$dir" 2>>$LOG_FILE | gpg --batch -c --passphrase $PASSPHRASE -o "$archive" 2>>$LOG_FILE
|
||||
check_pipe_rc ${PIPESTATUS[@]}
|
||||
return $?
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user