From: Martin Pitt Date: Tue, 3 Jan 2012 15:18:25 +0000 (+0100) Subject: add update-installed-deb X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=51cb4ee86a26ade0de1455da9356e46cbd88bed4;p=bin.git add update-installed-deb --- diff --git a/update-installed-deb b/update-installed-deb new file mode 100755 index 0000000..b0de93a --- /dev/null +++ b/update-installed-deb @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +if [ `id -u` = 0 ]; then + SUDO= +else + SUDO=sudo +fi + +P="" +for deb in *.deb; do + if dpkg -s ${deb%%_*} 2>/dev/null|grep -q '^Status:'; then + P="$P $deb" + else + echo "Skipping $deb, not installed" + fi +done + +$SUDO dpkg -i $P