at master 1.0 kB view raw
1updateToolPath() { 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 10} 11 12moveQtDevTools() { 13 if [ -n "$devTools" ]; then 14 for tool in $devTools; do 15 moveToOutput "$tool" "${!outputDev}" 16 done 17 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 24 fi 25 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 32 fi 33 fi 34}