-
Notifications
You must be signed in to change notification settings - Fork 0
/
tarjdk.sh
executable file
·36 lines (27 loc) · 887 Bytes
/
tarjdk.sh
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
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -e
if [ "$BUILD_IOS" != "1" ]; then
unset AR AS CC CXX LD OBJCOPY RANLIB STRIP CPPFLAGS LDFLAGS
git clone https://github.com/termux/termux-elf-cleaner
cd termux-elf-cleaner
make CFLAGS=__ANDROID_API__=24 termux-elf-cleaner
chmod +x termux-elf-cleaner
cd ..
findexec() { find $1 -type f -name "*" -not -name "*.o" -exec sh -c '
case "$(head -n 1 "$1")" in
?ELF*) exit 0;;
MZ*) exit 0;;
#!*/ocamlrun*)exit0;;
esac
exit 1
' sh {} \; -print
}
findexec jreout | xargs -- ./termux-elf-cleaner/termux-elf-cleaner
findexec jdkout | xargs -- ./termux-elf-cleaner/termux-elf-cleaner
fi
sudo cp -R jre_override/lib/* jreout/lib/
sudo cp -R jre_override/lib/* jdkout/jre/lib
cd jreout
tar cJf ../jre8-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .
cd ../jdkout
tar cJf ../jdk8-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .