diff --git a/.zsh/config.sh b/.zsh/config.sh index 66ee4d3..1df682d 100644 --- a/.zsh/config.sh +++ b/.zsh/config.sh @@ -57,8 +57,6 @@ alias :q='exit' alias repo-add='repo-add -s --key D0391BF9' alias repo-remove='repo-remove -s --key D0391BF9' alias scrot='maim -s -u ~/Downloads/screenshot-$(%Y%m%d-%H%M%S).png' -alias share='eval $(vault2env --key=secret/minio/knut-cc --export) && share --bucket=knut-cc --file-template="file/{{ printf \"%.8s\" .Hash}}/{{ .SafeFileName }}" --base-url="https://knut.cc/#" --progress' -alias shareperm='eval $(vault2env --key=secret/minio/knut-cc --export) && share --bucket=knut-cc --file-template="permanent/{{ printf \"%.8s\" .Hash}}/{{ .SafeFileName }}" --base-url="https://knut.cc/#" --progress' alias shfmt='shfmt -d -s -ci' alias ssh='ssh-key-host' alias terraria='docker run --rm -ti -v /home/luzifer/tmp/terraria:/data -p 7777:7777 luzifer/terraria' diff --git a/bin/share b/bin/share new file mode 100755 index 0000000..3385978 --- /dev/null +++ b/bin/share @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + +. <(vault2env --key=secret/minio/knut-cc --export) + +exec ~/gocode/bin/share --bucket=knut-cc --file-template="file/{{ printf \"%.8s\" .Hash}}/{{ .SafeFileName }}" --base-url="https://knut.cc/#" --progress "$@" diff --git a/bin/shareperm b/bin/shareperm new file mode 100755 index 0000000..f913b6b --- /dev/null +++ b/bin/shareperm @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + +. <(vault2env --key=secret/minio/knut-cc --export) + +exec ~/gocode/bin/share --bucket=knut-cc --file-template="permanent/{{ printf \"%.8s\" .Hash}}/{{ .SafeFileName }}" --base-url="https://knut.cc/#" --progress "$@"