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:
parent
82a2f04042
commit
50cc79647c
1 changed files with 10 additions and 0 deletions
10
sh/ea
10
sh/ea
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue