forked from QEDteam/scuba-sweep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_signature.sh
38 lines (27 loc) · 1.07 KB
/
create_signature.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Ask the user for their name
echo "Create android key signature and update an key.properties! \n"
echo "What is your app desired key name?"
read keyName
echo "What is your app desired key alias?"
read keyAlias
echo "What is your desired password (you'll set this on key generation this is for key. properties file so let them be the same)"
read keyPassword
echo "What is your desired path? Default is current folder (eg. /User/john/documents/keystores)"
read keyPath
echo ====================================
echo ========= GENERATING ==========
echo ====================================
if [ -z "$keyPath" ]
then
keyPath=$(pwd)
fi
keytool -genkey -v -keystore "$keyPath/$keyName.jks" -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias $keyAlias
echo "storePassword=$keyPassword
keyPassword=$keyPassword
keyAlias=$keyAlias
storeFile=$keyPath/$keyName.jks" > './android/key.properties'
echo -e "\n$keyName.jks" >> .gitignore
echo "Get your SHA1 and SHA256 from here"
keytool -list -v -keystore "$keyPath/$keyName.jks" -alias $keyAlias
echo "All done!"