Last active
December 19, 2018 04:25
-
-
Save delabassee/7f70d686a8080542b3fe760c9f9b31f6 to your computer and use it in GitHub Desktop.
Simple Dive wrapper to explore an Fn function layers
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 [[ "$#" -ne 2 ]]; then | |
echo "Illegal number of arguments, it should be '<myapp>' '<myfunction>'." | |
else | |
FUNC="$(fn list fn $1 | grep $2 | grep -o '[0-9a-zA-Z\-\.\_\/]*:[0-9a-zA-Z.]*')" | |
if [ $? -eq 0 ]; then | |
dive "$FUNC" | |
else | |
echo "Unable to find the function, check the arguments." | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment