summaryrefslogtreecommitdiffstats
path: root/fb.in
AgeCommit message (Collapse)AuthorFilesLines
2014-02-19Support combining -n and -t to set the tarball namev1.3.2Florian Pritz1-3/+3
This does change the default from upload to stdin, but I don't care. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-08Create all required directories for apikeyv1.3.1Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-02Fix conflict between --data-urlencode and -Fv1.3.0Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-02Use bash arrays to allow spaces in apikey file pathFlorian Pritz1-18/+18
This also fixes a bug in the shell uploader which used single quotes around the argument to --data-urlencode which sadly doesn't work at all. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-08-28Create config dir if neededv1.2.1Florian Pritz1-0/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-08-11Add -a option to generate a new api keyFlorian Pritz1-2/+50
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-08-11make curlopts and useragent global variablesFlorian Pritz1-2/+5
Needed for apikey patch. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-08-11Add API key supportFlorian Pritz1-1/+13
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-07-28Added file name option for stdin pastes (-n <file name>)v1.1.4Joakim Reinert1-3/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-05-11Default to httpsFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-02-14Don't save timestamp when gzippingFlorian Pritz1-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-01-09Add debugging supportFlorian Pritz1-1/+12
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-01-09fb-helper: Use getoptFlorian Pritz1-1/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-11-27Add timeouts to shell clientv1.1.1Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-10-27Add support for config filev1.1Florian Pritz1-0/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-10-09Lowercase most variable namesFlorian Pritz1-99/+99
I don't like the look of everything being upper case and it certainly complicates writing the variable names. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-10-09Move internal variables further downFlorian Pritz1-10/+10
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-08-15fix netrc line in help messagev1.0.5Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-06-12Fix bug with 0-byte files on Darwinv1.0.4n0nsense/masterFlorian Pritz1-1/+1
Seems like wc -c $file doesn't return "0 $file" on Darwin. wc -c < $file is simpler because it doesn't need cut and works fine, so we just use that. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-05-07Replace echo with printfFlorian Pritz1-24/+28
echo is inconsistent across different platforms and this also removes an unneeded fork. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-05-07Replace -n option to echo with | tr -d "\n"Florian Pritz1-1/+1
The echo builtin on darwin doesn't support any options and will output them. References: https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/echo.1.html Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-06Print "better" message when $file can't be readFlorian Pritz1-2/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-04Error on 0-byte filesFlorian Pritz1-0/+4
No point in uploading a really empty file and it might even cause confusion to see an empty page when clicking the link. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-03-14properly quote all uses of $STAT.v1.0Moritz Wilhelmy1-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-03-14unify `uname -s` casesFlorian Pritz1-5/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-03-01use pbcopy instead of xclip on DarwinFlorian Pritz1-1/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-18fb.in: fix stat call on darwinFlorian Pritz1-2/+1
%b returns blocks, but we want bytes (%z) Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-14Fixes errors on Mac OS XMarkus1-0/+1
2012-01-25add -# to reduce curl progress outputFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-25fall back to openssl if base64 executable is not availableFlorian Pritz1-1/+13
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2012-01-25check for getopts before using itFlorian Pritz1-0/+5
busybox sh doesn't have it and will now display an error. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-25merge functions and shell helper into main scriptFlorian Pritz1-9/+44
This makes the main script able to run alone again. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-04fix stat calls on non-gnu systemsFlorian Pritz1-2/+4
Reported-by: Moritz Wilhelmy <moritz+git@wzff.de> Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-11-24add new functions: is_url() do_tar_upload()v0.9.1Florian Pritz1-12/+34
These will come in handy once -t supports bundling downloaded files (URL as an argument instead of a file). Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-11-24remove fetched files even when upload failedFlorian Pritz1-3/+2
If the upload failed and the user supplied multiple URLs, we will find those on the next run and try to upload them again. Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-10-10remove unused USERAGENT variableFlorian Pritz1-1/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-15fix mktemp lineMoritz Wilhelmy1-1/+1
"-t" expands to $TMPDIR (or /tmp if unset), which means, the user can override in which directory temporary files are created. This works with GNU mktemp (although GNU deprecated -t) as well as BSD mktemp (does not replace X by random characters but rather appends them; this does not matter much) and busybox mktemp (which requires the number of X's to be exactly 6)
2011-09-15avoid reading output from type shell-builtinMoritz Wilhelmy1-1/+1
2011-09-12improve error handlingFlorian Pritz1-18/+16
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-12rework tar/compression code; reduce dependenciesFlorian Pritz1-30/+37
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-11Revert "add -C option: gpg encryption"v0.9Florian Pritz1-14/+1
This reverts commit df54bdd9eeb043265a1446f8242037c983047cb0. The way this was implemented is pretty limited so it's better if the user runs gpg manually. Conflicts: fb.in Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-11fetch history from serverFlorian Pritz1-15/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-08-15quote filename and add date to -HFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-08-15don't add error to the historyFlorian Pritz1-3/+5
If $URL is not a URL the upload failed for some reason, so it should not be added to the history. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-08-09remove ids from the history when called with -dFlorian Pritz1-1/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-08-09add a local history; -H optionFlorian Pritz1-1/+18
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-06-27add -C option: gpg encryptionFlorian Pritz1-1/+14
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-06-04display error when required executables are missingv0.8Florian Pritz1-0/+11
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-06-04use -c for decompression when used with -gFlorian Pritz1-2/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-06-04remove dependency on curl binaryFlorian Pritz1-26/+8
fb-upload is now called fb-helper which supports downloading and uploading Signed-off-by: Florian Pritz <bluewind@xinu.at>