Merge #323286: cmake: fix file fixing process

...into staging
This commit is contained in:
Vladimír Čunát 2024-07-20 09:42:16 +02:00
commit e2f5764068
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -5,7 +5,7 @@ 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 |
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\1^g' -e 's^/opt\([ /]\|$\)^/var/empty\1^g' < "$fn" > "$fn.tmp"
mv "$fn.tmp" "$fn"