Created
August 21, 2015 10:11
-
-
Save teknoraver/547e3774f271cffd179f to your computer and use it in GitHub Desktop.
This file contains 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
#!/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'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment