diff --git a/git-extra/PKGBUILD b/git-extra/PKGBUILD index 85f67ca21b..e8696f88b8 100644 --- a/git-extra/PKGBUILD +++ b/git-extra/PKGBUILD @@ -5,7 +5,7 @@ pkgbase="mingw-w64-${_realname}" pkgname=($_realname "${MINGW_PACKAGE_PREFIX}-${_realname}") _ver_base=1.1 -pkgver=1.1.657.d7f05a9c2 +pkgver=1.1.659.e3eddae38 pkgrel=1 pkgdesc="Git for Windows extra files" arch=('any') @@ -79,7 +79,7 @@ sha256sums=('8ed76d1cb069ac8568f21c431f5e23caebea502d932ab4cdff71396f4f0d5b72' 'dcbd1b981d5b899afe30151a5f5a27ea52025ff1335f131af1b5891f62ddd55b' '683ab066be19cb4defec470ebd53f165ca5dbf761fd40c13aee8abe31ba42803' '1cf2c13fb97c51375a76ed479362c3cbcdb51ab4d3a745e8d2c3a780badd8d46' - '201fc40c1aadadceccc617511a4add05536b3638bff34456cc334e3b21c130e7' + '2ad7292f8ea4aa7d027221bff2a987ad8e7c72a6866a5f14ea67f6187e850244' '180e05c1b8afa34d59cb2f6635bc75fece10474f37e164ea5916a6b3b56e20dd' '22f41610dea842890955032af30efdb60e80f310e95a04e57ab36b10e0376923' '38c0cf57e03d275cdd42984f102bee8352fac672f875ab23c46b9625eefc49f3' diff --git a/git-extra/astextplain b/git-extra/astextplain index be82357d12..ac5ab42390 100755 --- a/git-extra/astextplain +++ b/git-extra/astextplain @@ -7,28 +7,21 @@ if test "$#" != 1 ; then fi # XXX output encoding (UTF-8) hardcoded -case "$1" in - *.ods | *.ODS | *.odf |*.ODF | *.odt | *.ODT) +case "$(file --brief --mime-type "$1")" in + application/vnd.oasis.opendocument.spreadsheet | application/vnd.oasis.opendocument.formula | application/vnd.oasis.opendocument.text) odt2txt "$1" || cat "$1" ;; - *.doc | *.DOC | *.dot | *.DOT) - case "$(file --brief --mime-type "$1")" in - application/msword) - out=$(antiword -m UTF-8 "$1") && sed "s/\^M$//" <<<$out || cat "$1" - ;; - *) - cat "$1" - ;; - esac + application/msword) + out=$(antiword -m UTF-8 "$1") && sed "s/\^M$//" <<<$out || cat "$1" ;; - *.docx | *.DOCX | *.dotx | *.DOTX | *.docm | *.DOCM | *.dotm | *.DOTM) + application/vnd.openxmlformats-officedocument.wordprocessingml.* | application/vnd.ms-word.*.macroenabled.12) docx2txt.pl "$1" - || cat "$1" ;; - *.pdf | *.PDF) + application/pdf) out=$(pdftotext -q -layout -enc UTF-8 "$1" -) && sed "s/(\^M$)|(^\^L)//" <<<$out || cat "$1" ;; # TODO add rtf support - *.rtf | *.RTF) + application/rtf | text/rtf) cat "$1" ;; *)