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
| find . -type f -name '*.java' | \ | |
| while read f; do \ | |
| target=$(grep '^package ' $f | sed -e 's/package \+//' -e 's/;$//' -e 's/\./\//g'); \ | |
| newf="src/main/java/${target}/$(basename $f)"; \ | |
| mkdir -p $(dirname $newf); \ | |
| git mv $f $newf; \ | |
| chmod 644 $newf; \ | |
| done |
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
| # http://stackoverflow.com/a/12048161/679052 | |
| $ git remote add Bar /path/to/bar | |
| $ git merge -s ours --no-commit Bar/master | |
| $ git read-tree --prefix=public/bar -u Bar/master:www/tools/ |
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
| find ./*/src/main/java/ -type f ! -name *.java | xargs -n 1 -P 1 -I{} bash -c "newdir=\$(echo \"\$(dirname {})\" | sed 's/src\/main\/java/src\/main\/resources/'); mkdir -p \$newdir; git mv {} \$newdir" |
NewerOlder