2019-03-22 23:17:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-11-22 22:44:21 +00:00
|
|
|
# Copyright (c) 2013-2020, The PurpleI2P Project
|
2019-03-22 23:17:39 +00:00
|
|
|
#
|
|
|
|
# This file is part of Purple i2pd 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
|
|
|
|
|
2021-02-10 14:57:31 +00:00
|
|
|
if [ -f ../i2pd_*_android_binary.zip ]; then
|
2019-03-22 23:17:39 +00:00
|
|
|
rm i2pd_*_android_binary.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Prepare files for package
|
|
|
|
mkdir archive
|
|
|
|
|
|
|
|
for ABI in "${!ABILIST[@]}"; do
|
2021-02-10 14:57:31 +00:00
|
|
|
if [ -f ../android_binary_only/libs/${ABI}/i2pd ]; then
|
|
|
|
cp ../android_binary_only/libs/${ABI}/i2pd archive/i2pd-${ABILIST[$ABI]}
|
2019-03-22 23:17:39 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
cp i2pd archive/i2pd
|
2021-02-10 14:57:31 +00:00
|
|
|
cp -rH ../android/assets/certificates archive/
|
|
|
|
cp -rH ../android/assets/tunnels.conf.d archive/
|
|
|
|
cp -H ../android/assets/i2pd.conf archive/
|
|
|
|
cp -H ../android/assets/tunnels.conf archive/
|
2019-03-22 23:17:39 +00:00
|
|
|
|
|
|
|
# Compress files
|
|
|
|
cd archive
|
|
|
|
zip -r6 ../i2pd_${GITDESC}_android_binary.zip .
|
|
|
|
|
|
|
|
# Remove temporary folder
|
|
|
|
cd ..
|
|
|
|
rm -r archive
|