mass rewrite of find parameters to cross-platform style
Fixes #9044, close #9667. Thanks to @taku0 for suggesting this solution. Now we have no modes starting with `/` or `+`. Rewrite the `-perm` parameters of find: - completely safe: rewrite `/0100` and `+100` to `-0100`, - slightly semantics-changing: rewrite `+111` to `-0100`. I cross-verified the `find` manual pages for Linux, Darwin, FreeBSD.
This commit is contained in:
@@ -86,7 +86,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preFixup = ''
|
||||
echo "=== PatchElfing away ==="
|
||||
find $out/libexec/Mathematica/SystemFiles -type f -perm +100 | while read f; do
|
||||
find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do
|
||||
type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/')
|
||||
if [ -z "$type" ]; then
|
||||
:
|
||||
|
||||
Reference in New Issue
Block a user