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:
@@ -20,9 +20,9 @@ stdenv.mkDerivation {
|
||||
buildPhase = ''
|
||||
find . -name Makefile | xargs sed -i -e "s@/bin/rm@$(type -P rm)@g"
|
||||
find . -name Makefile | xargs sed -i -e "s@/bin/mv@$(type -P mv)@g"
|
||||
find . -perm +111 -type f | xargs sed -i -e "s@/bin/csh@$(type -P csh)@g"
|
||||
find . -perm +111 -type f | xargs sed -i -e "s@/bin/rm@$(type -P rm)@g"
|
||||
find . -perm +111 -type f | xargs sed -i -e "s@/bin/mv@$(type -P mv)@g"
|
||||
find . -perm -0100 -type f | xargs sed -i -e "s@/bin/csh@$(type -P csh)@g"
|
||||
find . -perm -0100 -type f | xargs sed -i -e "s@/bin/rm@$(type -P rm)@g"
|
||||
find . -perm -0100 -type f | xargs sed -i -e "s@/bin/mv@$(type -P mv)@g"
|
||||
|
||||
sed -i -e "s/^XLIBS *=.*/XLIBS=-lXaw -lXt -lX11/" source/formed/Makefile
|
||||
|
||||
|
||||
Reference in New Issue
Block a user