diff options
author | Matt Mower <mowerm@gmail.com> | 2013-12-29 12:57:20 -0600 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-09 17:10:38 -0700 |
commit | 8dacaed6ec978527f95205f9ed14622ddd1a9a09 (patch) | |
tree | 29f0ba702e2e34853bc2a45ebd012033a81db32f /envsetup.sh | |
parent | 1797b2d5a9f5c8aefec22e4a8ceeef1b7eb78459 (diff) | |
download | build-8dacaed6ec978527f95205f9ed14622ddd1a9a09.zip build-8dacaed6ec978527f95205f9ed14622ddd1a9a09.tar.gz build-8dacaed6ec978527f95205f9ed14622ddd1a9a09.tar.bz2 |
envsetup: repolastsync
Prints date and time of last repo sync. Example:
Last repo sync: 11 Jun 2015, 21:54:59 CDT / 12 Jun 2015, 02:54:59 UTC
Change-Id: I4280b500e58237479194ad2e230ed7466db87755
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh index 6eb9734..57f3d5c 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -29,6 +29,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y - mka: Builds using SCHED_BATCH on all processors - mkap: Builds the module(s) using mka and pushes them to the device. - cmka: Cleans and builds using mka. +- repolastsync: Prints date and time of last repo sync. - reposync: Parallel repo sync using ionice and SCHED_BATCH - repopick: Utility to fetch changes from Gerrit. - installboot: Installs a boot.img to the connected device. @@ -2115,6 +2116,13 @@ function cmka() { fi } +function repolastsync() { + RLSPATH="$ANDROID_BUILD_TOP/.repo/.repo_fetchtimes.json" + RLSLOCAL=$(date -d "$(stat -c %z $RLSPATH)" +"%e %b %Y, %T %Z") + RLSUTC=$(date -d "$(stat -c %z $RLSPATH)" -u +"%e %b %Y, %T %Z") + echo "Last repo sync: $RLSLOCAL / $RLSUTC" +} + function reposync() { case `uname -s` in Darwin) |