Skip to content

Instantly share code, notes, and snippets.

@dominickm
Created April 11, 2017 13:46
Show Gist options
  • Save dominickm/5033be9f84f154467c3d09a3db575362 to your computer and use it in GitHub Desktop.
Save dominickm/5033be9f84f154467c3d09a3db575362 to your computer and use it in GitHub Desktop.
A Simple Ruby that gets an alias name out of a Java keystore file. Requires the Java keystore tools to be installed on the system. Works on Mac and Linux
keystore_file = ARGV[0]
if keystore_file
cmd = 'keytool -list -v -keystore' + ' ' + keystore_file + '| grep "Alias name\|Creation date"'
puts system(cmd)
else
puts 'please pass in a keystore file'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment