1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 06:49:03 -08:00

add ea puts which signs files before uploading them

This commit is contained in:
Connor Olding 2024-02-23 22:33:17 -08:00
parent 82a2f04042
commit 50cc79647c

10
sh/ea
View file

@ -8,6 +8,7 @@
ea() { ### @- **TODO:** document.
local cmd="${1:?missing subcommand}"; shift
case "$cmd" in
# FIXME: at the very least, escape spaces to %20!
head)
local trg="$EA_DOMAIN/$EA_DIR/${1:?missing target}"
curl -s -I "$trg"
@ -24,6 +25,15 @@ ea() { ### @- **TODO:** document.
curl -g -n -T "$src" "$dst"
return;;
puts)
local src="${1:?missing source}"
local dst="$EA_DOMAIN/$EA_AUTH/"
minisign -QSm "$src" || return
curl -g -n -T "$src" "$dst" || return
curl -g -n -T "$src.minisig" "$dst" || return
rm "$src.minisig"
return;;
move)
local src="$EA_DOMAIN/$EA_AUTH/${1:?missing source}"
local dst="$EA_DOMAIN/$EA_DIR/${2:?missing destination}"