Skip to content

Commit

Permalink
replacev2.sh: add file renames
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 10, 2016
1 parent d4bd176 commit 6306fb8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions scripts/replacev2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6306fb8

Please sign in to comment.