summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon GECOS <u@adam>2024-08-03 10:22:53 -0400
committerGordon GECOS <u@adam>2024-08-03 10:25:44 -0400
commitba4c5c5c4d00640a7c3926768af17fb9d8384ea3 (patch)
treedf2500e002e8010bbd2ed1172ae12d36a9e9efb0
parent1d6967e7a7ab3484001664a638e2bc976446af05 (diff)
improve readability
-rw-r--r--Makefile34
1 files changed, 17 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index a364f88..495de27 100644
--- a/Makefile
+++ b/Makefile
@@ -2,27 +2,27 @@ SHELL = bash
2 2
3snapshot_uri_base = https://snapshot.debian.org/package 3snapshot_uri_base = https://snapshot.debian.org/package
4 4
5kernel_version != uname -r 5sudo != [ "$$(id -u)" = 0 ] || echo sudo
6kernel_package_name != dpkg -S /boot/vmlinuz-$(kernel_version) | sed 's/:.*//' 6dpkg := $(sudo) dpkg
7kernel_package_version != dpkg-query --showformat='$${Version}\n' -W "$(kernel_package_name)" 7apt := $(sudo) apt
8kernel_source_package != dpkg-query --showformat='$${source:Package}\n' -W "$(kernel_package_name)" 8
9arch != dpkg-architecture -q DEB_HOST_ARCH 9kernel_version != uname -r
10 10kernel_package_name != dpkg -S /boot/vmlinuz-$(kernel_version) | sed 's/:.*//'
11want_version = ${kernel_package_version} 11kernel_package_version != dpkg-query --showformat='$${Version}\n' -W "$(kernel_package_name)"
12want_package = linux-image-${arch} 12kernel_source_package != dpkg-query --showformat='$${source:Package}\n' -W "$(kernel_package_name)"
13wantvencoded != sed 's/-/%2B/g' <<< "${want_version}" 13kernel_arch != dpkg-architecture -q DEB_HOST_ARCH
14snapshot_uri = ${snapshot_uri_base}/${kernel_source_package}/${wantvencoded}/\#${want_package}_${want_version} 14
15want_filename = ${want_package}_${want_version}_${arch}.deb 15want_package = linux-image-${kernel_arch}
16 16want_version = ${kernel_package_version}
17sudo != [ $$(id -u) = 0 ] || echo sudo 17want_filename = ${want_package}_${want_version}_${kernel_arch}.deb
18dpkg := $(sudo) dpkg 18wantvencoded = $(subst -,%2B,${want_version})
19snapshot_uri = ${snapshot_uri_base}/${kernel_source_package}/${wantvencoded}/\#${want_package}_${want_version}
19 20
20ifeq (,$(shell command -v hxprintlinks)) 21ifeq (,$(shell command -v hxprintlinks))
21$(shell $(sudo) apt install html-xml-utils >&2) 22$(shell $(apt) install html-xml-utils >&2)
22endif 23endif
23
24ifeq (,$(shell command -v wget)) 24ifeq (,$(shell command -v wget))
25$(shell $(sudo) apt install wget >&2) 25$(shell $(apt) install wget >&2)
26endif 26endif
27 27
28wanted_deb_uri != hxprintlinks "${snapshot_uri}" | \ 28wanted_deb_uri != hxprintlinks "${snapshot_uri}" | \