From 7d4d7217bf0351568c95e7210bb37eab461b142e Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Mon, 22 Mar 2021 08:29:27 -0400 Subject: [PATCH] Replace comments patch with an AWK script which replaces uncommented file-A.$1 with file-B.$0 where file-A.$1 = file-B.$1 --- Makefile | 2 +- TODO.md | 2 + patch-comments | 13 ++++++ pkgs-void.list | 16 +++---- pkgs-void.list.comments | 9 ++++ pkgs-void.list.comments.patch | 78 ----------------------------------- 6 files changed, 33 insertions(+), 87 deletions(-) create mode 100755 patch-comments create mode 100644 pkgs-void.list.comments delete mode 100644 pkgs-void.list.comments.patch diff --git a/Makefile b/Makefile index 4e7ab3c..cfec937 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ pkgs_void: pkgs_void_update: xbps-query -m | awk -F - '{sub("-" $$NF "$$", ""); print}' | sort -u > pkgs-void.list - patch pkgs-void.list pkgs-void.list.comments.patch + (echo '#'; ./patch-comments pkgs-void.list.comments pkgs-void.list) | sponge pkgs-void.list # # Golang diff --git a/TODO.md b/TODO.md index d1d2e32..ca0215e 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,5 @@ +- [x] Replace comments patch with an AWK script which replaces uncommented + file-A.$1 with file-B.$0 where file-A.$1 = file-B.$1 - [ ] Track components which have their own repos. How? Submodules? What else? - [ ] [khatus](https://github.com/khandkar/khatus) - [ ] [dwm](https://github.com/khandkar/dwm) diff --git a/patch-comments b/patch-comments new file mode 100755 index 0000000..f7a5f6f --- /dev/null +++ b/patch-comments @@ -0,0 +1,13 @@ +#! /usr/bin/awk -f + +FILENAME ~ /\.comments$/ { + commented[$1] = $0 + next +} + +commented[$1] { + print commented[$1] + next +} + +1 diff --git a/pkgs-void.list b/pkgs-void.list index b50b685..eafc950 100644 --- a/pkgs-void.list +++ b/pkgs-void.list @@ -5,7 +5,7 @@ R Signal-Desktop alsa-plugins-pulseaudio apache-fop -ario # GUI (GTK) MPD client +ario # GUI (GTK) MPD client aspell-en aspell-ru autoconf @@ -31,7 +31,7 @@ dmenu docker docker-compose dunst -element-desktop # Matrix.org client, replaces Riot +element-desktop # Matrix.org client, replaces Riot encfs extra-cmake-modules feh @@ -70,7 +70,7 @@ libtool lm_sensors lvm2 lxdm -mDNSResponder # Bonjour +mDNSResponder # Bonjour make man-pages-devel mate @@ -82,12 +82,12 @@ mpc mpd mpv mupdf -nawk # The one, true implementation of AWK +nawk # The one, true implementation of AWK ncmpc ncmpcpp ncurses-devel neofetch -net-tools # ifconfig et al +net-tools # ifconfig et al netbsd-wtf network-manager-applet nmap @@ -101,7 +101,7 @@ patch pcmanfm perl-List-MoreUtils-XS # Dependency of feedgnuplot, which isn't in Void repos. pfetch -picom # Replaces compton. +picom # Replaces compton. pidgin pkg-config python3-devel @@ -132,7 +132,7 @@ tig tmux tree udisks2 -ueberzug # For drawing images on terminals. Something built from src needed it. +ueberzug # For drawing images on terminals. Something built from src needed it. unixodbc-devel unzip vim @@ -156,7 +156,7 @@ xprop xrandr xscreensaver xtools -xwininfo # Needed for picom-trans to work, but isn't a dep of picom. +xwininfo # Needed for picom-trans to work, but isn't a dep of picom. youtube-dl zathura zathura-djvu diff --git a/pkgs-void.list.comments b/pkgs-void.list.comments new file mode 100644 index 0000000..4c57a90 --- /dev/null +++ b/pkgs-void.list.comments @@ -0,0 +1,9 @@ +ario # GUI (GTK) MPD client +element-desktop # Matrix.org client, replaces Riot +mDNSResponder # Bonjour +nawk # The one, true implementation of AWK +net-tools # ifconfig et al +perl-List-MoreUtils-XS # Dependency of feedgnuplot, which isn't in Void repos. +picom # Replaces compton. +ueberzug # For drawing images on terminals. Something built from src needed it. +xwininfo # Needed for picom-trans to work, but isn't a dep of picom. diff --git a/pkgs-void.list.comments.patch b/pkgs-void.list.comments.patch deleted file mode 100644 index 1c0adc8..0000000 --- a/pkgs-void.list.comments.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- pkgs-void.list 2021-03-14 09:27:42.795179658 -0400 -+++ pkgs-void.list 2021-03-14 09:22:20.202107907 -0400 -@@ -1,10 +1,11 @@ -+# - GraphicsMagick - MultiMC - R - Signal-Desktop - alsa-plugins-pulseaudio - apache-fop --ario -+ario # GUI (GTK) MPD client - aspell-en - aspell-ru - autoconf -@@ -30,7 +31,7 @@ - docker - docker-compose - dunst --element-desktop -+element-desktop # Matrix.org client, replaces Riot - encfs - extra-cmake-modules - feh -@@ -69,7 +70,7 @@ - lm_sensors - lvm2 - lxdm --mDNSResponder -+mDNSResponder # Bonjour - make - man-pages-devel - mate -@@ -81,12 +82,12 @@ - mpd - mpv - mupdf --nawk -+nawk # The one, true implementation of AWK - ncmpc - ncmpcpp - ncurses-devel - neofetch --net-tools -+net-tools # ifconfig et al - netbsd-wtf - network-manager-applet - nmap -@@ -98,9 +99,9 @@ - parallel - patch - pcmanfm --perl-List-MoreUtils-XS -+perl-List-MoreUtils-XS # Dependency of feedgnuplot, which isn't in Void repos. - pfetch --picom -+picom # Replaces compton. - pidgin - pkg-config - python3-devel -@@ -131,7 +132,7 @@ - tmux - tree - udisks2 --ueberzug -+ueberzug # For drawing images on terminals. Something built from src needed it. - unixodbc-devel - unzip - vim -@@ -155,7 +156,7 @@ - xrandr - xscreensaver - xtools --xwininfo -+xwininfo # Needed for picom-trans to work, but isn't a dep of picom. - youtube-dl - zathura - zathura-djvu -- 2.20.1