|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH] scripts/archive-source: Use more portable argument with tar command |
Date: | Thu, 8 Dec 2022 19:06:41 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 |
On 8/12/22 18:15, Daniel P. Berrangé wrote:
On Thu, Dec 08, 2022 at 05:20:51PM +0100, Philippe Mathieu-Daudé wrote:When using the archive-source.sh script on Darwin we get: tar: Option --concatenate is not supported Usage: List: tar -tf <archive-filename> Extract: tar -xf <archive-filename> Create: tar -cf <archive-filename> [filenames...] Help: tar --help Replace the long argument added by commit 8fc76176f6 ("scripts: use git-archive in archive-source") by their short form to keep this script functional.Or install a better tar implementation from brew ? https://formulae.brew.sh/formula/gnu-tar
Good idea, this works for me: -- >8 -- diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index 23e042dacd..150bdf5536 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -20,2 +20,3 @@ fi +tar=$(command -v gtar || command -v tar) tar_file=$(realpath "$1") @@ -69,3 +70,3 @@ for sm in $submodules; do test $? -ne 0 && error "failed to archive submodule $sm ($smhash)" - tar --concatenate --file "$tar_file" "$sub_file" + $tar --concatenate --file "$tar_file" "$sub_file" test $? -ne 0 && error "failed append submodule $sm to $tar_file" ---
[Prev in Thread] | Current Thread | [Next in Thread] |