From bef15594968f4899db673a73e89f29b5f3482714 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Thu, 11 Feb 2016 17:54:09 +0100 Subject: add xetcchanges --- xetcchanges | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 xetcchanges (limited to 'xetcchanges') diff --git a/xetcchanges b/xetcchanges new file mode 100755 index 0000000..f3e4935 --- /dev/null +++ b/xetcchanges @@ -0,0 +1,15 @@ +#!/bin/sh +# xetcchanges - show diff of /etc against binary packages + +xbps-query -o '/etc/*' | + awk 'function q(a) { gsub("\\47", "\47\\\47\47", a); return "\47"a"\47" } + { + sub(" \\([^)]*\\)$", "") + sub(" -> .*$", "") + i = index($0, ": ") + pkg = substr($0, 1, i-1) + file = substr($0, i+2) + system("[ -f " q(file) " ] && " \ + " xbps-query --cat=" q(file) " " q(pkg) \ + " | diff -u --label " q(pkg file) " - " q(file)) + }' -- cgit 1.4.1