Last active
December 16, 2015 08:19
-
-
Save mdesantis/5404609 to your computer and use it in GitHub Desktop.
Diff between package etc contents and current etc contents
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 | |
# From this stackexchange question: http://unix.stackexchange.com/questions/72746 | |
set -e | |
package=php5-fpm | |
mkdir $package | |
cd $package | |
# download the package | |
apt-get download $package | |
# deb package files are ar archives | |
ar vx $package*.deb | |
# containing some compressed tar archives | |
tar xzf data.tar.gz | |
# now you have the files | |
# you can get diffs for all of the files in etc if you would like | |
find etc -type f | | |
while read file ; do | |
diff $file /$file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment