slackbuilds/what-s_installed.sh

18 lines
370 B
Bash
Raw Normal View History

#!/bin/bash
cd $(dirname $0) || exit 1
PKGs=$(ls /var/lib/pkgtools/packages/ | sed 's|^\(.*\)-.*-.*-.*$|\1|')
2022-03-02 21:29:57 +01:00
2024-11-27 10:40:55 +01:00
PKG_OK="| x "
PKG_KO="| "
2024-11-27 10:16:27 +01:00
for cat in a ap d fonts l n xap y; do
cd $cat
for p in $(ls -1); do
2024-11-27 10:40:55 +01:00
echo $PKGs | grep -q " $(echo $p | tr -d /) " && echo -n "$PKG_OK" || echo -n "$PKG_KO"
echo "| $cat/$p"
done | sort
cd ..
done