replacev2.sh: add file renames

This commit is contained in:
Juergen E. Fischer 2016-08-07 16:17:02 +02:00
parent d4bd17615b
commit 6306fb8a9f

View File

@ -38,6 +38,29 @@ do
fi
done
find $codepaths \( -name "*v2*.h" -o -name "*v2*.cpp" -o -name "*v2*.sip" \) -type f | while read f; do
s=${f##*/}
d=${s/v2/}
echo "FIND $d"
if [ $(find $codepaths -name "$d" -print | wc -l) -gt 0 ]; then
echo "$f vs $b"
continue
fi
echo "MV $f ${f/v2/}"
git mv "$f" "${f/v2/}"
case "$s" in
*.sip)
echo "s#\b$s\b#$d#g;" >>$r
;;
*)
echo "s#\b$s\b#$d#g;" >>$r
;;
esac
done
echo "API breaks logged to: $d"
echo "Skipped V2 symbols: $s"
echo "Replacing from $r"