Created
March 12, 2017 06:59
-
-
Save xingrz/9e74d6e91daef23ee6d93942bb195cee to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
set -e | |
cat rk | while read line; do | |
echo $line | while read repo path; do | |
if [[ ! $repo =~ ^platform ]]; then | |
continue | |
fi | |
project="android_$(echo $path | sed 's/\//_/g')" | |
if [ -d $project ]; then | |
echo "\nAlready existed: $project" | |
exit | |
fi | |
echo "$repo -> $project" | |
mkdir $project | |
pushd $project | |
git init | |
git remote add upstream "https://android.googlesource.com/$repo" | |
git fetch upstream refs/tags/android-5.1.0_r5 | |
git reset --hard FETCH_HEAD | |
git tag refs/tags/android-5.1.0_r5 | |
cp -r /Volumes/RK3288/$path/* . | |
git add . | |
git commit -m "Import from firefly-rk3288_android5.1_git_20170224.tar.gz" | |
git tag rk3288/5.1/20170224 | |
hub create "rk3288-dev/$project" | |
git push -u origin master --tags | |
popd | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment