From 6ed25f26baf57115f8907966b0e170cef55f2a81 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 27 Oct 2024 14:10:34 -0400 Subject: Add initial setup --- bin/check | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 bin/check (limited to 'bin/check') diff --git a/bin/check b/bin/check new file mode 100755 index 0000000..fc1b75b --- /dev/null +++ b/bin/check @@ -0,0 +1,34 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +set -eu + +version=${1?"usage: $0 "} + +tgz=builds/git-annex-$version-linux-amd64.tar.gz +test -f "$tgz" || { + printf >&2 'file does not exist: %s\n' "$tgz" + exit 2 +} + +tdir=$(mktemp -d "${TMPDIR:-/tmp}"/static-annex-XXXXXXX) +tar xzf "$tgz" -C "$tdir" +cd "$tdir/git-annex-$version" + +if ldd bin/git-annex 2>/dev/null +then + printf >&2 'ldd unexpectedly had 0 exit status on bin/git-annex\n' + ldd bin/git-annex + exit 1 +fi + +PATH=$(pwd)/bin:$PATH +export PATH + +base=${tdir##*/} +command -v git-annex | grep -qF "$base" +command -v git-annex-shell | grep -qF "$base" +command -v git-remote-annex | grep -qF "$base" +command -v git-remote-tor-annex | grep -qF "$base" + +git annex test -- cgit v1.2.3