summaryrefslogtreecommitdiffstats
path: root/fb.in
AgeCommit message (Collapse)AuthorFilesLines
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>
2011-06-03print errors to stderrFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-06-03print an error if -t is used when operating on stdinFlorian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-06-03fix indentation in help messageFlorian Pritz1-2/+2
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-06-03display error when calling -d or -g without IDFlorian Pritz1-1/+4
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-06-03simplify curl callsFlorian Pritz1-6/+2
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-06-03move -d and -g codeFlorian Pritz1-12/+16
If these switches are present and there are no arguments the program should exit and not try to upload stdin. Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-06-03clarify -d and -g usageFlorian Pritz1-2/+2
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-04-10don't run xclip if $CLIPBOARD is emptyv0.7Florian Pritz1-1/+3
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-04-10use type to determine if xclip is availableFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-03-23switch license to GPLv3Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-03-21fall back to curl if fb-upload is unavailableFlorian Pritz1-3/+21
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-03-20use helper script instead of curl for uploadingFlorian Pritz1-16/+5
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
2011-03-10check if the target file existsFlorian Pritz1-0/+7
Signed-off-by: Florian Pritz <bluewind@server-speed.net>