Advertisement
teknoraver

eclipse2androidstudio

Nov 8th, 2014
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.63 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. [ -d "$1/.git" ] || exec echo "$1 is not a git repository"
  4.  
  5. cp -r $1/.git .
  6. git checkout AndroidManifest.xml && git mv -f AndroidManifest.xml app/src/main/
  7. git checkout res && {
  8.     rm -rf app/src/main/res/
  9.     git mv res app/src/main/
  10. }
  11. git checkout src && {
  12.     rm -rf app/src/main/java/
  13.     git mv -f src/* app/src/main/java/
  14. }
  15. git checkout assets && git mv assets/ app/src/main/
  16. rm gradlew.bat
  17. git status -s |awk '/^ D/{print$2}' |xargs git rm
  18. sed -i 's|<mapping directory="" vcs="" />|<mapping directory="$PROJECT_DIR$" vcs="Git" />|' .idea/vcs.xml
  19. echo -e "now:\n\tgit add --all\n\tgit commit -am'switch to android studio'"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement