Last active
March 15, 2019 16:32
-
-
Save wknapik/cc656be28f85524223151a6f9d849412 to your computer and use it in GitHub Desktop.
Retry an action in a make recipe if it fails (up to a specified number of times)
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
# Example usage: $(call retry,3,something that might fail) | |
retry = for ((i=0; i < $1; ++i)); do ( $2 ) && exit 0; sleep 3; done; false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment