diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2021-03-22 04:53:36 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2021-03-22 04:53:36 -0400 |
commit | a76c4746e2fa29b08ec3b506c28bf3211583093e (patch) | |
tree | 776f97c80aa035b9045845fefb9018ee767a16e7 | |
parent | 4c113a73c2033b4cea8ac4692322dd932b9ca227 (diff) |
tolerate unicode filenames in source-ballswip-2020-01
-rw-r--r-- | scripts/libmakepkg/source/file.sh.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/libmakepkg/source/file.sh.in b/scripts/libmakepkg/source/file.sh.in index b29aeb04..c11a1ec5 100644 --- a/scripts/libmakepkg/source/file.sh.in +++ b/scripts/libmakepkg/source/file.sh.in @@ -131,6 +131,18 @@ extract_file() { msg2 "$(gettext "Extracting %s with %s")" "$file" "$cmd" if [[ $cmd = "bsdtar" ]]; then $cmd -xf "$file" || ret=$? + if ((ret)); then + if LANG=en_US.utf8 $cmd -xf "$file"; then + res="$($cmd -vxf "$file" 2>&1 | grep -A1 "$utf_err")" + if [[ -n "$res" ]]; then + # warn and dump results + warning "this sourceball contains unicode filenames" + printf "$res\n" + + ret=0 + fi + fi + fi else rm -f -- "${file%.*}" $cmd -dcf -- "$file" > "${file%.*}" || ret=$? |