diff options
author | EuAndreh <eu@euandre.org> | 2023-03-28 12:21:20 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-28 19:51:09 -0300 |
commit | 8ff13c6ba6cc3eb35ca92682634425e2229486a6 (patch) | |
tree | 5ab70b5c0a4d1e45ec195f37d9ff70c207410862 /tests/checks | |
parent | src/bin/paku.in, Makefile: Use "debian.out.txt" to communicate output files (diff) | |
download | package-repository-8ff13c6ba6cc3eb35ca92682634425e2229486a6.tar.gz package-repository-8ff13c6ba6cc3eb35ca92682634425e2229486a6.tar.xz |
src/bin/paku.in: Add WIP version of Alpine support, based off of Debian
Diffstat (limited to 'tests/checks')
-rwxr-xr-x | tests/checks/apk.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/checks/apk.sh b/tests/checks/apk.sh new file mode 100755 index 0000000..5acb479 --- /dev/null +++ b/tests/checks/apk.sh @@ -0,0 +1,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 |