Skip to content

Instantly share code, notes, and snippets.

@professorjamesmoriarty
Created December 28, 2015 21:13
Show Gist options
  • Save professorjamesmoriarty/b223bd0c9198c17cbfb9 to your computer and use it in GitHub Desktop.
Save professorjamesmoriarty/b223bd0c9198c17cbfb9 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