2016-10-13 15:18:55 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
## Create lists of system- and TeX Live packages.
|
|
|
|
|
|
|
|
## Variables
|
|
|
|
PKG_ROOT="$HOME/.pkglists"
|
|
|
|
mkdir -p "$PKG_ROOT"
|
|
|
|
|
|
|
|
## Arch Linux
|
|
|
|
if command -v pacman >/dev/null 2>&1; then
|
2016-10-14 06:17:18 +02:00
|
|
|
pacman -Qneq | LC_ALL=C sort >"$PKG_ROOT/arch-official"
|
|
|
|
pacman -Qmeq | LC_ALL=C sort >"$PKG_ROOT/arch-aur"
|
2016-10-13 15:18:55 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
## FreeBSD
|
|
|
|
if [ "$(uname)" = "FreeBSD" ]; then
|
|
|
|
pkg_info | cut -f1 -d' ' >"$PKG_ROOT/freebsd"
|
|
|
|
fi
|
|
|
|
|
|
|
|
## TeXlive
|
|
|
|
if command -v tlmgr >/dev/null 2>&1; then
|
|
|
|
tlctl l >"$PKG_ROOT/texlive"
|
|
|
|
fi
|
2017-09-01 23:29:32 +02:00
|
|
|
|
|
|
|
## Gentoo
|
|
|
|
if command -v emerge >/dev/null 2>&1; then
|
2017-10-22 12:55:50 +02:00
|
|
|
mkdir -p "$PKG_ROOT/gentoo/package.use"
|
|
|
|
mkdir -p "$PKG_ROOT/gentoo/package.accept_keywords"
|
2017-09-01 23:29:32 +02:00
|
|
|
cp /var/lib/portage/world "$PKG_ROOT/gentoo/"
|
2017-10-22 12:55:50 +02:00
|
|
|
grep '^USE=' /etc/portage/make.conf > "$PKG_ROOT/gentoo/make.conf"
|
|
|
|
cp /etc/portage/package.use/manual "$PKG_ROOT/gentoo/package.use/manual"
|
|
|
|
cp /etc/portage/package.accept_keywords/manual "$PKG_ROOT/gentoo/package.accept_keywords/manual"
|
2017-09-01 23:29:32 +02:00
|
|
|
fi
|
2018-02-08 18:07:32 +01:00
|
|
|
|
|
|
|
## Void Linux
|
|
|
|
if command -v xbps-query >/dev/null 2>&1; then
|
|
|
|
xbps-query -m | sed 's/-[^-]\+$//' >"$PKG_ROOT/void-official"
|
|
|
|
fi
|