From 1ead0f5dfb48039f8e69f10c9702f848d4762ffc Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 8 Apr 2014 19:09:16 +0200 Subject: Adding (possibly not needed) pacman helper scripts --- bin/pacman-disowned | 16 ++++++++++++++++ bin/pacoptpd | 14 ++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 bin/pacman-disowned create mode 100755 bin/pacoptpd diff --git a/bin/pacman-disowned b/bin/pacman-disowned new file mode 100755 index 0000000..df1b5da --- /dev/null +++ b/bin/pacman-disowned @@ -0,0 +1,16 @@ +#!/bin/sh + +tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$ +db=$tmp/db +fs=$tmp/fs + +mkdir "$tmp" +trap 'rm -rf "$tmp"' EXIT + +pacman -Qlq | sort -u > "$db" + +find /bin /etc /lib /sbin /usr \ + ! -name lost+found \ + \( -type d -printf '%p/\n' -o -print \) | sort > "$fs" + +comm -23 "$fs" "$db" diff --git a/bin/pacoptpd b/bin/pacoptpd new file mode 100755 index 0000000..30e09ec --- /dev/null +++ b/bin/pacoptpd @@ -0,0 +1,14 @@ +#!/bin/bash +# +# list optional dependencies of installed packages +# + +for i in $(pacman -Qq) +do + deps="$(pacman -Qi ${i} | awk '/Optional/,/Required/' | grep -v "Required" | sed -e 's/Optional Deps[ ]*://g' -e 's/^[ ]*/ /')" + if [ "$deps" != " None" ]; then + echo "$i" + echo "$deps" + echo "" + fi +done -- cgit v1.2.3-70-g09d2