1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-11-18 01:46:46 +01:00
NekoX/bin/upload_alaha.sh
2020-08-10 10:23:50 +00:00

25 lines
503 B
Bash
Executable File

#!/bin/bash
outPath="TMessagesProj/build/outputs/apk/full/release"
#./gradlew TMessagesProj:assembleFullRelease || exit 1
rm -f $outPath/*universal*
for apk in $outPath/*.apk; do
echo ">> Uploading $apk"
curl https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendDocument \
-X POST \
-F chat_id="$TELEGRAM_CHANNEL" \
-F document="@$apk" \
--silent --show-error --fail > /dev/null &
done
trap 'kill $(jobs -p)' SIGINT
for job in `jobs -p`; do
wait $job
done