Skip to content

Instantly share code, notes, and snippets.

@ryzhovau
Created December 25, 2018 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryzhovau/c50241e53634652564a1f3f7ec7bbec7 to your computer and use it in GitHub Desktop.
Save ryzhovau/c50241e53634652564a1f3f7ec7bbec7 to your computer and use it in GitHub Desktop.
Entware configs comparison
#!/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