[Bug 51877] New: improve POSIX compatibility for wine-staging's patches/gitapply.sh