Skip to content

Instantly share code, notes, and snippets.

@mixaz
Last active July 5, 2017 16:10
Show Gist options
  • Save mixaz/05ced88a00e5961703e36e284baa8e70 to your computer and use it in GitHub Desktop.
Save mixaz/05ced88a00e5961703e36e284baa8e70 to your computer and use it in GitHub Desktop.
Copies all changed files (but not new or deleted ones) from AOSP tree, via 'repo' command
# usage:
# source build/envsetup.sh
# ./copy_diff_files.sh <folder to copy files to>
export T=$ANDROID_BUILD_TOP/$1
mkdir -p $T
repo forall -c 'mkdir -p $T/$REPO_PATH && cp -pv --parents `git diff --name-only` $T/$REPO_PATH'
find $T -type d -empty -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment