1
0
Fork 0

more helpers

This commit is contained in:
Gwenhael Le Moine 2024-04-02 13:56:39 +02:00
parent 6ac5d2cb0c
commit f842e852dd
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 29 additions and 2 deletions

View file

@ -1,4 +1,4 @@
.PHONY: release debug clean mrproper keystore
.PHONY: release debug clean mrproper pull-assets keystore
release:
./gradlew assembleRelease assembleReleaseUnitTest
@ -10,8 +10,14 @@ debug:
clean:
./gradlew clean
[ -e ./app/src/main/cpp/emu48plus.bkp ] && rm -fr ./app/src/main/cpp/emu48plus.bkp
[ -e ./app/src/main/assets/calculators.bkp ] && rm -fr ./app/src/main/assets/calculators.bkp
mrproper: clean
pull-assets:
bash ./pull-KMLs-and-ROMs.sh
zsh ./pull-emu48plus-sources.sh
keystore:
keytool -genkey -keystore ./keystore.jks -keyalg RSA -validity 9125 -alias key0
bash ./gen-keystore.sh

21
gen-keystore.sh Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
cd "$(dirname "$0")" || exit 1
KEYSTORE_FILE=${KEYSTORE_FILE:-./keystore.jks}
ALIAS=key-emu48
echo "Generating $KEYSTORE_FILE"
keytool -genkey -keystore "$KEYSTORE_FILE" -keyalg RSA -validity 9125 -alias $ALIAS
echo -n "Type again the password (will not echo): "
read -s password
echo
echo "Generating ./keystore.properties…"
cat <<EOF > ./keystore.properties
storeFile=$KEYSTORE_FILE
storePassword=$password
keyAlias=$ALIAS
keyPassword=$password
EOF