Skip to content

Instantly share code, notes, and snippets.

@professorjamesmoriarty
Created April 28, 2016 23:56
Show Gist options
  • Save professorjamesmoriarty/91f5fd5950c0417cbd0215b165977742 to your computer and use it in GitHub Desktop.
Save professorjamesmoriarty/91f5fd5950c0417cbd0215b165977742 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Set $PUUSH_API_KEY to your key and export it.
# The key is found on <http://puush.me/account/settings>.
if [ -z "$PUUSH_API_KEY" ]; then
echo "puu: please export api key" 1>&2
exit 1
fi
for file in "$@"; do
curl --progress-bar "https://puush.me/api/up" \
-F k="$PUUSH_API_KEY" -F z="poop" -F f="@$file" |
sed -e 's/0,\|,.*//g'
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment