Author: eelco
Date: Mon Jan 23 13:16:51 2012
New Revision: 31793
URL: https://nixos.org/websvn/nix/?rev=31793&sc=1
Log:
* 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.
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/tools/build-managers/cmake/setup-hook.sh
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/tools/build-managers/cmake/setup-hook.sh
==============================================================================
---
nixpkgs/branches/stdenv-updates/pkgs/development/tools/build-managers/cmake/setup-hook.sh
Mon Jan 23 13:06:01 2012 (r31792)
+++
nixpkgs/branches/stdenv-updates/pkgs/development/tools/build-managers/cmake/setup-hook.sh
Mon Jan 23 13:16:51 2012 (r31793)
@@ -3,10 +3,11 @@
}
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
}
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits