--- /usr/sbin/ppa-purge 2010-08-22 08:41:52.000000000 +0100 +++ /patches/ppa-purge 2010-09-14 18:57:10.000000000 +0100 @@ -83,7 +83,7 @@ shift $(($OPTIND -1)) PPAOWNER=$1 -if [ ! -z APTALT ]; then +if [ ! -z "$APTALT" ]; then APT=aptitude; APTALT=apt-get else APT=apt-get; APTALT=aptitude @@ -139,7 +139,7 @@ echo # Disable PPA from sources.list files -for LIST in for LIST in $(find /etc/apt/ -name "*.list" -exec readlink '{}' \;); do; do +for LIST in $(find /etc/apt/ -name "*.list" -exec readlink -f '{}' \;); do if [ -e $LIST ] && grep -q $PPAOWNER/$PPANAME $LIST; then msg "Disabling $PPAOWNER PPA from $LIST" sed -ri "\:^[^#]+/${PPAOWNER}/${PPANAME}/:s/^deb/# deb/" $LIST @@ -154,9 +154,9 @@ # APTALT actually works but it would be preferred to remove the package # from $REINSTALL directly. -if APT install $REINSTALL; then +if $APT install $REINSTALL; then msg "PPA purged successfully" -elif APTALT install $REINSTALL; then +elif $APTALT install $REINSTALL; then msg "PPA purged successfully using $APTALT fallback" else warn "Something went wrong, packages may not have been reverted"