From b867c5dc0097b09a75705d616cc10f65c3d60ffb Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 23 Dec 2022 12:07:30 +0100 Subject: knot pdb --- bin/sops | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 bin/sops (limited to 'bin/sops') diff --git a/bin/sops b/bin/sops new file mode 100755 index 0000000..89bb750 --- /dev/null +++ b/bin/sops @@ -0,0 +1,35 @@ +#!/bin/bash + +v=3.7.3 + +basedir="${0%/*}" +self="${0##*/}" + +s=$(uname -s) +case "$s" +in + Darwin) s=darwin ;; + Linux) s=linux ;; + *) echo "Unsupported system: $s" >/dev/stderr ;; +esac + +m=$(uname -m) +case "$m" +in + x86_64) m=amd64 ;; + arm64) ;; + *) echo "Unsupported machine: $m" >/dev/stderr ;; +esac + +url=https://github.com/mozilla/sops/releases/download/v${v}/sops-v${v}.$s.$m + +bin="$basedir/.$self/$self-$v" + +if [[ ! -x "$bin" ]] +then + mkdir -p $(dirname "$bin") + wget -O "$bin" "$url" + chmod +x "$bin" +fi + +exec "$bin" "${@}" -- cgit v1.2.3