diff options
| author | 2020-04-15 03:06:35 +0000 | |
|---|---|---|
| committer | 2020-04-15 03:06:35 +0000 | |
| commit | 87eb7f6e52f6332f6b3b5d4e287ce4cd6ee905d9 (patch) | |
| tree | 0bf92123346888ecf60e5a004493cbb5166d0d32 | |
| parent | 259e20acece0b22582e0b6164165dd6783645745 (diff) | |
| parent | b9602bc0d9a3e3ac2b8a65dfa5f26fb2e2e71d1e (diff) | |
Merge "Fork off update_shared_lib.sh to update_statsd_lib.sh" into rvc-dev
| -rwxr-xr-x | packages/SystemUI/scripts/update_statsd_lib.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/packages/SystemUI/scripts/update_statsd_lib.sh b/packages/SystemUI/scripts/update_statsd_lib.sh new file mode 100755 index 000000000000..79b9497a5f3f --- /dev/null +++ b/packages/SystemUI/scripts/update_statsd_lib.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +NUM_ARGS=$# +JAR_DESTINATION="$1/prebuilts/framework_intermediates/libs/systemui_statsd.jar" + +has_croot() { + declare -F croot > /dev/null + return $? +} + +check_environment() { + if ! has_croot; then + echo "Run script in a shell that has had envsetup run. Run '. update_statsd_lib.sh' from scripts directory" + return 1 + fi + + if [ $NUM_ARGS -ne 1 ]; then + echo "Usage: . update_statsd_lib.sh PATH_TO_UNBUNDLED_LAUNCER e.g. . update_statsd_lib ~/src/ub-launcher3-master" + return 1 + fi + return 0 +} + +main() { + if check_environment ; then + pushd . + croot + mma -j16 SystemUI-statsd + cp out/target/product/$TARGET_PRODUCT/obj/JAVA_LIBRARIES/SystemUI-statsd_intermediates/javalib.jar $JAR_DESTINATION + popd + fi +} + +main + |