Created
March 24, 2015 19:47
-
-
Save chazcheadle/4d1aaaaa9398b070ea48 to your computer and use it in GitHub Desktop.
Curl content cache busting with timestamp parameter
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 | |
| if [[ $1 == *"?"* ]] | |
| then | |
| q='&' | |
| else | |
| q='?' | |
| fi | |
| cmd='curl '$1$q'timestamp='`date +%s`; | |
| exec $cmd; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment