-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathprefixmove.sh
More file actions
executable file
·26 lines (21 loc) · 916 Bytes
/
prefixmove.sh
File metadata and controls
executable file
·26 lines (21 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Similar script to downloadAar_prefixed.sh, without the download part.
# For use with local testing aars.
set -e
set -x
# The prefixed aar can't be used as is.
# The jar itself needs to be shadowed to properly add on the prefix.
unzip -o libwebrtc_prefixed.aar -d prefix/
rm -rf android-prefixed/shadow/libs/*
mkdir -p android-prefixed/shadow/libs
mv prefix/classes.jar android-prefixed/shadow/libs/
# Copy the .so files to the main project for inclusion.
rm -rf android-prefixed/src/main/jniLibs/*
mkdir -p android-prefixed/src/main/jniLibs
mv prefix/jni/* android-prefixed/src/main/jniLibs
# Rename the so files to liblkjingle_peerconnection_so.so
find android-prefixed/src/main/jniLibs/ -type f \
-name "libjingle_peerconnection_so.so" \
-exec sh -c 'f="{}"; mv -- "$f" "${f%libjingle_peerconnection_so.so}liblkjingle_peerconnection_so.so"' \;
# clean up unzipped prefix files
rm -rf prefix/