Skip to content

Instantly share code, notes, and snippets.

@xy4n
Forked from shizmob/pomfload
Created February 16, 2014 16:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xy4n/9036808 to your computer and use it in GitHub Desktop.
Save xy4n/9036808 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: `basename $0` FILE [FILE...]"
exit 1
fi
for f in "$@"; do
d=$(curl -sS --progress-bar -F files[]=@"$f" http://pomf.se/upload.php | jq -c -r '.files[0].url')
if [ $# -gt 1 ]; then
# Apparently some builtin echos haet -n.
/bin/echo -n "$f: "
fi
echo "http://a.pomf.se/$d"
done

pomfload - upload to pomf from the comfort of your command line

usage: pomfload FILE [FILE [FILE...]]

what are you, stupid?

requirements

  • bourne-compatible shell
  • curl
  • jq

license

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
                    Version 2, December 2004 

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> 

 Everyone is permitted to copy and distribute verbatim or modified 
 copies of this license document, and changing it is allowed as long 
 as the name is changed. 

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 

  0. You just DO WHAT THE FUCK YOU WANT TO.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment