summaryrefslogtreecommitdiff
path: root/packages/SystemUI/scripts
diff options
context:
space:
mode:
author Zak Cohen <zakcohen@google.com> 2020-01-17 11:15:22 -0800
committer Zak Cohen <zakcohen@google.com> 2020-01-17 14:38:02 -0800
commita2ab079fe1783fdbe0120d193f9c517d98ed0699 (patch)
tree72c763e1e6b4422dc5c1e17951d8794d1ea2f3e8 /packages/SystemUI/scripts
parentab6f975a5d26941102323ad3067d3be79c2dfd8f (diff)
Adds script to update system ui shared libary.
Run in current environment: . update_shared_lib.sh ~/src/ub-launcher3-master Test: local Change-Id: I1a63eddd59135e4eace1c5dd24b1026383957099
Diffstat (limited to 'packages/SystemUI/scripts')
-rwxr-xr-xpackages/SystemUI/scripts/update_shared_lib.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/packages/SystemUI/scripts/update_shared_lib.sh b/packages/SystemUI/scripts/update_shared_lib.sh
new file mode 100755
index 000000000000..05374934be2a
--- /dev/null
+++ b/packages/SystemUI/scripts/update_shared_lib.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+NUM_ARGS=$#
+
+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_shared_lib.sh' from scripts directory"
+ return 1
+ fi
+
+ if [ $NUM_ARGS -ne 1 ]; then
+ echo "Usage: . update_shared_lib PATH_TO_UNBUNDLED_LAUNCER e.g. . update_shared_lib ~/src/ub-launcher3-master"
+ return 1
+ fi
+ return 0
+}
+
+main() {
+ if check_environment ; then
+ pushd .
+ croot
+ mma -j16 SystemUISharedLib
+ JAR_DESTINATION="$1/prebuilts/framework_intermediates/quickstep/libs/sysui_shared.jar"
+ cp out/target/product/$TARGET_PRODUCT/obj/JAVA_LIBRARIES/SystemUISharedLib_intermediates/javalib.jar $JAR_DESTINATION
+ popd
+ fi
+}
+
+main
+