Created
March 20, 2019 20:22
-
-
Save joshbuhler/380031e75fa1837c2019a0837754fbe2 to your computer and use it in GitHub Desktop.
Used to run plutil -lint against all .strings files found in a folder, or its subfolders.
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
# Usage: sh stringsValidator.sh ~/path/to/strings/folder | |
rootFolder=. | |
if [[ $1 ]]; then | |
rootFolder=$1 | |
fi | |
stringsFiles=$(find $rootFolder -type f -name "*.strings"); | |
for stringsFile in $stringsFiles; do | |
plResult=$(plutil -lint $stringsFile) | |
if [[ $plResult == *".strings: OK"* ]]; then | |
echo "✅" $plResult | |
else | |
echo "🛑" $plResult | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment