Skip to content

Instantly share code, notes, and snippets.

@jblaine
Last active February 12, 2016 06:09
Show Gist options
  • Save jblaine/240f09b0078efff2505b to your computer and use it in GitHub Desktop.
Save jblaine/240f09b0078efff2505b to your computer and use it in GitHub Desktop.
Come at me bro
for i in `curl --silent -H "X-JFrog-Art-Api:API_KEY_HERE_REDACTED" -X GET \
"https://artifacts.mitre.org/artifactory/api/search/badChecksum?type=sha1&repos=java-libs-release-local" \
| grep uri | awk '{print $3}' | sed -e 's/"//g' -e 's/,//g' \
-e 's/https:\/\/artifactory\.our\.org\/artifactory\/api\/storage\/java-libs-release-local\///g'`; \
do echo "{ \"repoKey\": \"java-libs-release-local\", \"path\": \"$i\" }" | \
curl --header "Content-Type:application/json" -H "X-JFrog-Art-Api:API_KEY_HERE_REDACTED" \
-X POST --verbose -d @- https://artifactory.our.org/artifactory/ui/checksums/fix; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment