Skip to content

Instantly share code, notes, and snippets.

@cmhtcleo
Created October 19, 2011 14:24
Show Gist options
  • Save cmhtcleo/1298439 to your computer and use it in GitHub Desktop.
Save cmhtcleo/1298439 to your computer and use it in GitHub Desktop.
Android sync script
#!/bin/bash
WORKDIR=/data/android/git
cd $WORKDIR
rm -rf CM-gerrit
for file in `ls`
do
if [[ -d $file ]] ; then
pushd $file
if [[ "$file" == "CM" ]] || [[ "$file" == "aosp" ]]; then
/data/bin/repo sync -j 5 -f
/data/bin/repo sync -j 5 -f
/data/bin/repo sync -j 5 -f
else
git pull
fi
popd
fi
done
cp -al CM CM-gerrit
cd CM-gerrit
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j 5 -f
repo sync -j 5 -f
repo sync -j 5 -f
cd -
@cmhtcleo
Copy link
Author

In the /data/android/git folder I have the following

android_device_htc_leo_cm -- from the cmhtcleo github
android_bootable_recovery -- from arif-ali's github
CM - a repo sync of the android repo from a fork on cmhtcleo's github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment