about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2023-06-26 18:10:31 +0200
committerLeah Neukirchen <leah@vuxu.org>2023-06-26 18:10:31 +0200
commit2ebeae75528ea057be5232e5f1406cea65aea571 (patch)
tree6283393be732bdcea9f8b5794bd65a73eeb2229f
parent95274e1b5d5826d0248b1053388592cec744864e (diff)
downloadxtools-2ebeae75528ea057be5232e5f1406cea65aea571.tar.gz
xtools-2ebeae75528ea057be5232e5f1406cea65aea571.tar.xz
xtools-2ebeae75528ea057be5232e5f1406cea65aea571.zip
xetcchanges: skip symlinks
Fixes #248.
-rwxr-xr-xxetcchanges3
1 files changed, 2 insertions, 1 deletions
diff --git a/xetcchanges b/xetcchanges
index bf9899b..90eeb94 100755
--- a/xetcchanges
+++ b/xetcchanges
@@ -5,7 +5,8 @@ xbps-query -o ${1:-"/etc/*"} |
 	awk 'function q(a) { gsub("\\47", "\47\\\47\47", a); return "\47"a"\47" }
 	{
 		sub(" \\([^)]*\\)$", "")
-		sub(" -> .*$", "")
+		if (sub(" -> .*$", ""))
+			next
 		i = index($0, ": ")
 		pkg = substr($0, 1, i-1)
 		file = substr($0, i+2)