Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- [ -d "$1/.git" ] || exec echo "$1 is not a git repository"
- cp -r $1/.git .
- git checkout AndroidManifest.xml && git mv -f AndroidManifest.xml app/src/main/
- git checkout res && {
- rm -rf app/src/main/res/
- git mv res app/src/main/
- }
- git checkout src && {
- rm -rf app/src/main/java/
- git mv -f src/* app/src/main/java/
- }
- git checkout assets && git mv assets/ app/src/main/
- rm gradlew.bat
- git status -s |awk '/^ D/{print$2}' |xargs git rm
- sed -i 's|<mapping directory="" vcs="" />|<mapping directory="$PROJECT_DIR$" vcs="Git" />|' .idea/vcs.xml
- 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