-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathcheck.sh
More file actions
executable file
·26 lines (25 loc) · 838 Bytes
/
check.sh
File metadata and controls
executable file
·26 lines (25 loc) · 838 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/sh
result=""
rm -rf ./app/src/main/assets/*.apk
rm -rf ./app/build
rm -rf ./pluginapk/build
./gradlew -q clean &&
./gradlew -q pluginapk:assembleDebug &&
cp ./pluginapk/build/outputs/apk/debug/pluginapk-debug.apk ./app/src/main/assets/
./gradlew app:clean
./gradlew app:assembleDebug
host_path=./app/build/outputs/host_id.txt
plugin_path=./app/build/outputs/plugin_id.txt
aapt d resources ./app/build/outputs/apk/debug/app-debug.apk >$host_path
aapt d resources ./app/src/main/assets/pluginapk-debug.apk >$plugin_path
# shellcheck disable=SC2002
img_id=$(cat $plugin_path | grep plugin_img | awk NR==1 | awk '{print $3}')
# shellcheck disable=SC2002
cat $host_path | grep -q "$img_id"
# shellcheck disable=SC2181
if [ $? -ne 0 ] ;then
result="very good"
else
result="插件图片id和宿主资源id冲突"
fi
echo $result