Last active
May 22, 2017 09:52
-
-
Save onuralp/e803bfc5d1c130e50cb534fcafaef7b6 to your computer and use it in GitHub Desktop.
Marvel Character slug names for bash
This file contains hidden or 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 | |
set -e | |
# Gets a marvel-charecter slug | |
NAME=$(marvel-characters) | |
# For MacOS | |
echo "$NAME" | iconv -t ascii//TRANSLIT | sed -E s/[^a-zA-Z0-9]+/-/g | sed -E s/^-+\|-+$//g | tr A-Z a-z | |
# For other OS | |
# echo "$NAME" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z |
This file contains hidden or 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 | |
set -e | |
# If you don't like release-names that's helm auto-generated. You are not alone. | |
# This trick let us to use marvel-character names instead of helm release names | |
npm install -g marvel-characters | |
# Resources: | |
# https://gist.github.com/oneohthree/f528c7ae1e701ad990e6 | |
# https://github.com/mattdesl/marvel-characters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't like kubernetes helms' auto-generated release names. That's why I created this bash. I like elasticsearchs' naming. They are using marvel characters. So why don't we use it for helm.