]> git.sev.monster Git - abchr.git/commitdiff
apkgvers: replace grep/sed with awk master
authorsev <git@sev.monster>
Fri, 26 Jan 2024 01:40:06 +0000 (19:40 -0600)
committersev <git@sev.monster>
Fri, 26 Jan 2024 01:40:06 +0000 (19:40 -0600)
apkgvers

index 135f0a6644ff11d0c24e2912ecff8ab2e909fc5a..51256cee759aeb6cce09db71675773a0d359d3bd 100755 (executable)
--- a/apkgvers
+++ b/apkgvers
@@ -1,3 +1,3 @@
 #!/bin/sh
 if ! which column >/dev/null 2>&1; then echo need column command >&2; exit 1; fi
-grep pkgver= */APKBUILD | sort | sed -e 's_/APKBUILD:pkgver=_ _' | column -tNname,version -R1
+awk 'match($0, /pkgver="?([^" ;]*)/, m) {gsub("/APKBUILD$", "", FILENAME); print FILENAME, m[1]}' */APKBUILD | sort | column -tNname,version -R1
This page took 0.040855 seconds and 4 git commands to generate.