summaryrefslogtreecommitdiffstats
path: root/files/install-new.awk
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackware.com>2017-10-19 13:49:43 -0500
committerRobby Workman <rworkman@slackware.com>2017-10-22 01:59:41 -0500
commit406e0e84f5321652fa1a539d80be6ca5df1ffb1b (patch)
tree0225a21dca44efe55180ee2e83027d5eaca2ddec /files/install-new.awk
downloadslackpkg-2.82.2.tar.xz
*: Initial commit of slackpkg (as of 2.82.2 release)2.82.2
Diffstat (limited to 'files/install-new.awk')
-rw-r--r--files/install-new.awk45
1 files changed, 45 insertions, 0 deletions
diff --git a/files/install-new.awk b/files/install-new.awk
new file mode 100644
index 0000000..d2fd4ee
--- /dev/null
+++ b/files/install-new.awk
@@ -0,0 +1,45 @@
+/^(a|ap|d|e|f|k|kde|kdei|l|mac|n|t|tcl|x|xap|xfce|y)\/([a-zA-Z0-9_\+.\-]+):.* ([Aa]dded|[Ss]plit|[Rr]enamed|[Mm]oved|[Nn]ame [Cc]hange|NAME CHANGE|[Ss]witched).*/ {
+ INPUT=$1
+ fs=FS
+ FS="/" ; OFS="/"
+ $0=INPUT
+ FULLPACK=$NF
+ FS="-" ; OFS="-"
+ $0=FULLPACK
+ if ( NF > 3 ) {
+ NF=NF-3
+ } else {
+ FS=":" ; OFS=":"
+ $0=$0
+ $0=$1
+ }
+ FS=fs
+ CONTINUE=no
+ print $0
+}
+
+/^(a|ap|d|e|f|k|kde|kdei|l|mac|n|t|tcl|x|xap|xfce|y)\/([a-zA-Z0-9_\+.\-]+): *$/ {
+ INPUT=$1
+ fs=FS
+ FS="/" ; OFS="/"
+ $0=INPUT
+ FULLPACK=$NF
+ FS="-" ; OFS="-"
+ $0=FULLPACK
+ if ( NF > 3 ) {
+ NF=NF-3
+ } else {
+ FS=":"
+ $0=$1
+ }
+ FS=fs
+ CONTINUE=yes
+ NAME=$0
+}
+
+/^ *([Aa]dded|[Ss]plit|[Rr]enamed|[Mm]oved|[Nn]ame [Cc]hange|NAME CHANGE|[Ss]witched).*/ {
+ if ( CONTINUE==yes ) {
+ print NAME
+ }
+ CONTINUE=no
+}