diff options
| author | 2020-05-07 12:38:22 -0400 | |
|---|---|---|
| committer | 2020-05-07 12:38:22 -0400 | |
| commit | 497d8d2302355523673dac2ab3e431f665bd070c (patch) | |
| tree | 7f3db8d194508c1b825c7310ae7acd03d689452b | |
| parent | zsh: add jump (diff) | |
update anypaste plugins
Diffstat (limited to '')
| -rw-r--r-- | dot_anypaste-plugins/executable_anyminio | 10 | ||||
| -rw-r--r-- | dot_anypaste-plugins/executable_brpaste | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/dot_anypaste-plugins/executable_anyminio b/dot_anypaste-plugins/executable_anyminio index 974d5cb..b89dbe2 100644 --- a/dot_anypaste-plugins/executable_anyminio +++ b/dot_anypaste-plugins/executable_anyminio @@ -8,9 +8,13 @@ case $1 in upload) d=$(date +%Y/%m/%d) path="$anyminio_prefix/$d/$ap_human_name" - "$anyminio_cli" cp "$ap_path" "$path" - url=$($anyminio_cli ls --json "$path" | jq -r .url) - echo >&2 + + "$anyminio_cli" cp "$ap_path" "$path" || + { echo 'ERROR: Upload failed!' >&2; exit 1; } + url=$($anyminio_cli ls --json "$path" | jq -r .url) || + {echo 'ERROR: Fetching object information failed!' >&2; exit 2; } + + echo echo "Link: $url" echo "Direct: $url" echo diff --git a/dot_anypaste-plugins/executable_brpaste b/dot_anypaste-plugins/executable_brpaste index 7d36ca4..bb5afb9 100644 --- a/dot_anypaste-plugins/executable_brpaste +++ b/dot_anypaste-plugins/executable_brpaste @@ -9,7 +9,7 @@ case $1 in upload) brpaste_id=$(curl -#fF "data=<$ap_path" "$brpaste_host") \ || { echo 'ERROR: Upload failed!' >&2 && exit 1; } - echo >&2 + echo echo "Link: $brpaste_host/$brpaste_id" echo "Direct: $brpaste_host/raw/$brpaste_id" echo |
