Fix incorrect output path

This commit is contained in:
Agatha Lovelace 2023-03-09 14:12:30 +01:00
parent 0558727ebe
commit 67a09519c4
Signed by: sorceress
GPG Key ID: 01D0B3AB10CED4F8
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,6 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
# Prepare
echo ":: Downloading Tusky"
@ -24,18 +26,20 @@ cd Tusky/
# keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
#
echo ":: Signing app"
export APKSIGNER=$(find $ANDROID_SDK_ROOT -type f -executable -name apksigner)
APKSIGNER=$(find $ANDROID_SDK_ROOT -type f -executable -name apksigner)
read -p "Enter keystore password: " -s KEYSTORE_PWD
cd ..
mkdir -p out
UNSIGNED_PATH=$(find Tusky/app/build/outputs/apk/blue/release/ -type f -name 'Tusky_*_blue_release.apk')
$APKSIGNER sign \
--ks agatha.keystore \
--ks-key-alias "Agatha" \
--ks-pass pass:$KEYSTORE_PWD \
--key-pass pass:$KEYSTORE_PWD \
--in Tusky/app/build/outputs/apk/blue/release/app-blue-release-unsigned.apk \
--in $UNSIGNED_PATH \
--out "out/tusky-blue-$(date +'%F-%T').apk"
SUCCESS=$?