linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / qt-5 / hooks / move-qt-dev-tools.sh
blob85489c85105bc9e62d52a42a55c6e90288cd862f
1 updateToolPath() {
2 local tool="$1"
3 local target="$2"
4 local original="${!outputBin}/$tool"
5 local actual="${!outputDev}/$tool"
6 if grep -q "$original" "$target"; then
7 echo "updateToolPath: Updating \`$original' in \`$target\'..."
8 sed -i "$target" -e "s|$original|$actual|"
9 fi
12 moveQtDevTools() {
13 if [ -n "$devTools" ]; then
14 for tool in $devTools; do
15 moveToOutput "$tool" "${!outputDev}"
16 done
18 if [ -d "${!outputDev}/mkspecs" ]; then
19 find "${!outputDev}/mkspecs" -name '*.pr?' | while read pr_; do
20 for tool in $devTools; do
21 updateToolPath "$tool" "$pr_"
22 done
23 done
26 if [ -d "${!outputDev}/lib/cmake" ]; then
27 find "${!outputDev}/lib/cmake" -name '*.cmake' | while read cmake; do
28 for tool in $devTools; do
29 updateToolPath "$tool" "$cmake"
30 done
31 done