Last active
December 14, 2015 14:29
-
-
Save lfryc/5101382 to your computer and use it in GitHub Desktop.
There are set of commands we need to migrate patches from 4.3 to 5.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
format patches | |
============== | |
git format-patch 4.3.0.20130130-Final..4.3.1.20130305-Final -o ~/workspaces/richfaces5/patches/dev-examples/ | |
dos2unix for patch files | |
======================== | |
dos2unix * | |
moved files | |
=========== | |
for original in `cat ../patches/components/* | egrep '^(---|\+\+\+) ' | egrep -v '\/dev\/null' | sed -r 's#(---|\+\+\+) (a|b)/(([^ ]+)/([^\/]+))$#\3#g' | uniq`; do basename=`basename $original`; count=`find -name $basename | wc -l`; if [[ "$count" -eq 1 ]]; then target=`find -name $basename | sed -r 's#^\./##'`; echo "sed -ri 's#$original#$target#g' *"; fi; done | |
multiple occurences | |
=================== | |
for original in `cat ../patches/components/* | egrep '^(---|\+\+\+) ' | egrep -v '\/dev\/null' | sed -r 's#(---|\+\+\+) (a|b)/(([^ ]+)/([^\/]+))$#\3#g' | uniq`; do basename=`basename $original`; count=`find -name $basename | wc -l`; if [[ "$count" -gt 1 ]]; then pushd ../patches/components/ >/dev/null; echo ""; echo "$basename ($original)"; find -type f -exec grep -q $basename {} \; -print; popd >/dev/null; find -name $basename; fi ; done | |
new files | |
========= | |
for original in `cat ../patches/components/* | egrep '^(---|\+\+\+) ' | egrep -v '\/dev\/null' | sed -r 's#(---|\+\+\+) (a|b)/(([^ ]+)/([^\/]+))$#\3#g' | uniq`; do basename=`basename $original`; count=`find -name $basename | wc -l`; if [[ "$count" -eq 0 ]]; then pushd ../patches/components/ >/dev/null; echo ""; echo "$basename"; find -type f -exec grep -q $basename {} \; -print; popd >/dev/null; fi ; done | |
sed -ri 's#(input|core|misc|iteration|output)\/ui#framework#g' * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment