Created
August 27, 2013 18:40
-
-
Save dpq/6357355 to your computer and use it in GitHub Desktop.
Rebuild all installed Debian packages from source.
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
mkdir world; cd world | |
for PKG in `aptitude search ~i | awk '{ print $3; }'`; do | |
apt-get source $PKG | |
PKGDIR=`find . -maxdepth 1 -mindepth 1 -type d` | |
cd $PKGDIR | |
MISSINGDEPS=`cat debian/control | grep Build-Depends | sed 's/,//g' | sed 's/([^)]*)//g' | sed 's/\[[^][]*\]//g' | sed 's/Build-Depends\://'` | |
aptitude -y install $MISSINGDEPS | |
dpkg-buildpackage | |
cd .. | |
dpkg -i *.deb | |
rm -r * | |
done | |
cd .. | |
rmdir world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment