i2pd/contrib/android_binary_pack/build-archive
Михаил Подивилов fdb0ce6703 I2P -> .NET
2019-05-11 18:25:50 +03:00

45 lines
916 B
Bash
Executable file

#!/bin/bash
# Copyright (c) 2013-2017, The PurpleI2P Project
#
# This file is part of Purple dotnet project and licensed under BSD3
#
# See full license text in LICENSE file at top of project tree
GITDESC=$(git describe --tags)
declare -A ABILIST=(
["armeabi-v7a"]="armv7l"
["arm64-v8a"]="aarch64"
["x86"]="x86"
["x86_64"]="x86_64"
)
# Remove old files and archives
if [ -d archive ]; then
rm -r archive
fi
if [ -f dotnet_*_android_binary.zip ]; then
rm dotnet_*_android_binary.zip
fi
# Prepare files for package
mkdir archive
for ABI in "${!ABILIST[@]}"; do
if [ -f ../../android_binary_only/libs/${ABI}/dotnet ]; then
cp ../../android_binary_only/libs/${ABI}/dotnet archive/dotnet-${ABILIST[$ABI]}
fi
done
cp dotnet archive/dotnet
cp -rH ../../android/assets/* archive/
# Compress files
cd archive
zip -r6 ../dotnet_${GITDESC}_android_binary.zip .
# Remove temporary folder
cd ..
rm -r archive