committing changes in /etc made by "-bash"

Package changes:
This commit is contained in:
2023-02-06 14:26:39 +02:00
parent e582ddedad
commit b78b22077d
157 changed files with 2583 additions and 118 deletions

View File

@@ -49,6 +49,9 @@ get_changed_packages () {
if [ "$LOWLEVEL_PACKAGE_MANAGER" = pkgng ]; then
get_changes | sed 's/^/\/etc\//;s/\s*$//' | xargs -d '\n' pkg which --quiet | rev | cut -d'-' -f2- | rev
fi
if [ "$LOWLEVEL_PACKAGE_MANAGER" = xbps ]; then
get_changes | sed 's/^/\/etc\//;s/\s*$//' | xargs -d '\n' xbps-query -o | cut -d':' -f1
fi
}
if etckeeper unclean; then
@@ -66,7 +69,7 @@ if etckeeper unclean; then
get_changed_packages | sort | uniq > $pl.found-pkgs
if [ -s $pl.found-pkgs ]; then
sed -i 's/^/^[-+]/;s/$/ /' $pl.found-pkgs
etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]' | grep -f $pl.found-pkgs > $pl.found-packages
etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | grep -E '^[-+]' | grep -f $pl.found-pkgs > $pl.found-packages
if [ -s $pl.found-packages ]; then
echo "Packages with configuration changes:"
cat $pl.found-packages || true
@@ -74,7 +77,7 @@ if etckeeper unclean; then
fi
fi
echo "Package changes:"
etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]' || true
etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | grep -E '^[-+]' || true
) | etckeeper commit --stdin
else
etckeeper commit "$(printf "$message")"