Created
December 25, 2018 07:41
-
-
Save ryzhovau/c50241e53634652564a1f3f7ec7bbec7 to your computer and use it in GitHub Desktop.
Entware configs comparison
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
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo 'Please, provide target config for comparison with others.' | |
exit 1 | |
fi | |
grep -h '^CONFIG' ~/Entware/configs/*.config | sort | uniq > /tmp/all.config | |
grep '^CONFIG' $1 | sort > /tmp/target.config | |
echo "Following options not found in $1:" | |
diff -u /tmp/all.config /tmp/target.config | grep '^\-CONFIG' | sed 's/^\-//g' | sort | |
rm /tmp/all.config /tmp/target.config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment