blob: fba03df76e0eb8f1f5f28eed958fe40a20aa7767 (
plain)
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
31
32
33
34
35
|
#!/bin/bash
pkgs=(
'bash-git-prompt'
'check-kernel'
'mark-as-expendable-dir'
'update-all'
'update-ddns'
)
for pkg in "${pkgs[@]}"; do
printf '%s_%%-1.deb: %s-%%.tar.xz %s.control\n\t./build-it "$@"\n\n' "$pkg" "$pkg" "$pkg"
printf '%s-%%.tar.xz:\n\twget -nd "https://git.eckner.net/Erich/%s/snapshot/$@"\n\n' "$pkg" "$pkg"
done
printf 'all:'
for pkg in "${pkgs[@]}"; do
ver=$(
curl -Ss "https://git.eckner.net/Erich/$pkg/" \
| sed '
s@^.*<a href='"'"'/Erich/'"$pkg"'/snapshot/'"$pkg"'-\([0-9.]\+\)\.tar\.xz'"'"'>'"$pkg"'-\1\.tar\.xz</a>.*$@\1@
t
d
' \
| sort -V \
| tail -n1
)
if [ -z "${ver}" ]; then
>&2 printf 'could not find version of %s - ignoring for "all"\n' "$pkg"
continue
fi
printf ' %s_%s-1.deb' "$pkg" "$ver"
done
printf '\n\n'
|