diff --git a/git-archive-all.sh b/git-archive-all.sh index b72dc4d..1813d3c 100755 --- a/git-archive-all.sh +++ b/git-archive-all.sh @@ -271,7 +271,17 @@ if [ $VERBOSE -eq 1 ]; then fi # Concatenate archives into a super-archive. if [ $SEPARATE -eq 0 -o "-" == "$OUT_FILE" ]; then - if [ $FORMAT == 'tar.gz' ]; then + cmd=$(git config --get "tar.$FORMAT.command") + if [ -n "$cmd" -a "$FORMAT" != "tar" ]; then + superfile_=${superfile%.$FORMAT}.tar + $cmd -d < "$superfile" > "$superfile_" && rm -f "$superfile" + sed -e '1d' $TMPFILE | while read file; do + file_=${file%.$FORMAT}.tar + $cmd -d < "$file" > "$file_" && rm -f "$file" + $TARCMD --concatenate -f "$superfile_" "$file_" && rm -f "$file_" + done + $cmd < "$superfile_" > "$superfile" && rm -f "$superfile_" + elif [ $FORMAT == 'tar.gz' ]; then gunzip $superfile superfile=${superfile:0: -3} # Remove '.gz' sed -e '1d' $TMPFILE | while read file; do