diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2022-12-23 12:07:30 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2022-12-23 12:07:30 +0100 |
commit | b867c5dc0097b09a75705d616cc10f65c3d60ffb (patch) | |
tree | d3b76b97b2639621926a715927975055992e85a4 /bin/sops | |
parent | 9572ac5ffbb869f59f354303556f90e86bd67bcc (diff) | |
download | infra-b867c5dc0097b09a75705d616cc10f65c3d60ffb.tar.gz infra-b867c5dc0097b09a75705d616cc10f65c3d60ffb.tar.bz2 infra-b867c5dc0097b09a75705d616cc10f65c3d60ffb.tar.xz infra-b867c5dc0097b09a75705d616cc10f65c3d60ffb.zip |
knot pdb
Diffstat (limited to 'bin/sops')
-rwxr-xr-x | bin/sops | 35 |
1 files changed, 35 insertions, 0 deletions
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" "${@}" |