blob: 5acb479dedb55743a07abfc1cc12844e2a7496df (
about) (
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
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh
set -eu
while getopts 'k:' flag; do
case "$flag" in
k)
KEY="$OPTARG"
;;
*)
exit 2
;;
esac
done
shift $((OPTIND - 1))
if [ -z "${KEY:-}" ]; then
echo 'Missing "-k KEY" argument.' >&2
exit 2
fi
set -x
REPO="$1/alpine"
if command -v remembering; then
echo 'remembering(1) is already installed.' >&2
exit 1
fi
if apk info remembering; then
echo 'remembering(1) is already in apk(8) list.' >&2
exit 1
fi
wget -qO- "$REPO"/"$KEY".rsa.pub | doas tee /etc/apk/keys/"$KEY".rsa.pub
printf '%s\n' "$REPO" | doas tee -a /etc/apk/repositories
doas apk add remembering
remembering --help
remembering -V
|