Path: blob/buildjre8/tarjdk.sh
861 views
#!/bin/bash1set -e23if [[ "$BUILD_IOS" != "1" ]]; then45unset AR AS CC CXX LD OBJCOPY RANLIB STRIP CPPFLAGS LDFLAGS6git clone --depth 1 -b 'v2.2.0' https://github.com/termux/termux-elf-cleaner7cd termux-elf-cleaner8autoreconf --install9bash configure10make CFLAGS=-D__ANDROID_API__=2411cd ..1213findexec() { find $1 -type f -name "*" -not -name "*.o" -exec sh -c '14case "$(head -n 1 "$1")" in15?ELF*) exit 0;;16MZ*) exit 0;;17#!*/ocamlrun*)exit0;;18esac19exit 120' sh {} \; -print21}2223findexec jreout | xargs -- ./termux-elf-cleaner/termux-elf-cleaner24findexec jdkout | xargs -- ./termux-elf-cleaner/termux-elf-cleaner2526fi2728cp -Rf jre_override/lib/* jreout/lib/29cp -Rf jre_override/lib/* jdkout/jre/lib3031cd jreout3233# Strip in place all .so files thanks to the ndk34find ./ -name '*.so' -execdir ${NDK}${NDK_PREBUILT_ARCH} {} \;3536tar cJf ../jre8-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .3738cd ../jdkout39tar cJf ../jdk8-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .40414243