about summary refs log tree commit diff
path: root/xrecent
blob: c492146d57be225bbe70a4d64b6d1bc4cc21a4b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# xrecent [REPOURL|XBPS_ARCH] - list packages in repo ordered by build date

case "$(xbps-uhelper arch)" in
	aarch64*)
		repo=https://alpha.de.repo.voidlinux.org/current/aarch64/;;
	*-musl)
		repo=https://alpha.de.repo.voidlinux.org/current/musl/;;
	*)
		repo=https://alpha.de.repo.voidlinux.org/current/;;
esac

case "$1" in
*/*)
	repo=$1;;
aarch64*)
	repo=https://alpha.de.repo.voidlinux.org/current/aarch64/
	export "XBPS_TARGET_ARCH=$1";;
*-musl)	
	repo=https://alpha.de.repo.voidlinux.org/current/musl/
	export "XBPS_TARGET_ARCH=$1";;
?*)
	repo=https://alpha.de.repo.voidlinux.org/current/
	export "XBPS_TARGET_ARCH=$1";;
esac

xbps-query -M -i -R --repository=$repo -p build-date -s '' |
	sed 's/: /	/' |
	sort -t '	' -k 2 |
	column -s '	' -t