19 lines
303 B
Bash
Executable File
19 lines
303 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SECRET="$(pass paf)"
|
|
AUTH="-HAuthorization: Secret $SECRET"
|
|
INSTANCE="https://p.afpy.org/"
|
|
|
|
if [[ $1 == "--list" ]]
|
|
then
|
|
curl "$AUTH" $INSTANCE::/list/
|
|
exit
|
|
fi
|
|
|
|
if [[ $# == 0 ]]
|
|
then
|
|
curl "$AUTH" "$INSTANCE" --data-binary @-
|
|
else
|
|
curl "$AUTH" "$INSTANCE" "${@/*/-F&=@&}"
|
|
fi
|