mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 00:08:32 +01:00
* Don't replace /opt if it's followed by something other than
whitespace or a /, otherwise strings such as /foo/opticaldrive.c will be broken. svn path=/nixpkgs/branches/stdenv-updates/; revision=31793
This commit is contained in:
parent
3cf71dcfd1
commit
1e886749b5
1 changed files with 2 additions and 1 deletions
|
@ -3,10 +3,11 @@ addCMakeParams() {
|
|||
}
|
||||
|
||||
fixCmakeFiles() {
|
||||
# Replace occurences of /usr and /opt by /var/empty.
|
||||
echo "fixing cmake files..."
|
||||
find "$1" \( -type f -name "*.cmake" -o -name "*.cmake.in" -o -name CMakeLists.txt \) -print |
|
||||
while read fn; do
|
||||
sed -e 's|/usr|/var/empty|g' -e 's|/opt|/var/empty|g' < "$fn" > "$fn.tmp"
|
||||
sed -e 's^/usr\([ /]\|$\)^/var/empty\1^g' -e 's^/opt\([ /]\|$\)^/var/empty\1^g' < "$fn" > "$fn.tmp"
|
||||
mv "$fn.tmp" "$fn"
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue