Created
November 29, 2017 17:21
-
-
Save neuberoliveira/f9dabd8afe715f7ffa86a2a1e7601358 to your computer and use it in GitHub Desktop.
Generate keyhashfor android app based on your keystore file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! $1 ]; then | |
echo 'Keystore file is required' | |
exit | |
fi | |
if [ ! $2 ]; then | |
echo 'Alias is required' | |
exit | |
fi | |
alias=$2 | |
keystore=$1 | |
echo $alias | |
echo $keystore | |
keytool -exportcert -alias $alias -keystore $keystore | openssl sha1 -binary | openssl base64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
Dont forget to give it execute permission
chmod +x generate-keyhash