Last active
May 22, 2024 22:34
-
-
Save omajid/d4ed94ad4af53ca5e499aadb76dcd684 to your computer and use it in GitHub Desktop.
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 -euo pipefail | |
while IFS= read -r -d '' file; do | |
echo "$file" | |
jq --sort-keys . "$file" > "$file.normalized" | |
mv "$file.normalized" "$file" | |
done < <(find . -type f -iname '*.json' -print0) | |
while IFS= read -r -d '' file; do | |
echo "$file" | |
jq '(.libraries[]).sha512 |= "hash" ' "$file" > "$file.normalized" | |
mv "$file.normalized" "$file" | |
done < <(find . -type f -iname '*.deps.json' -print0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment