summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-04-04fb-helper: properly clean up upon errorFlorian Pritz1-5/+10
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-03-15Makefile: get rid of MY_CFLAGS; allow users to override CFLAGSFlorian Pritz1-3/+2
CFLAGS=-O0 make; will still work as expected make CFLAGS=-O0; allows to completely override the flags, ignoring what is set in the makefile. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-03-14Makefile: create all manpage dirsv1.0.2Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-03-14Makefile: preserve some flags even if $CFLAGS is setv1.0.1Florian Pritz1-2/+3
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-16fb-helper.c: remove "OVER 9000" jokeFlorian Pritz1-3/+1
9000 hours is just over one year and probably nobody is ever going to hit this. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-14Fixes errors on Mac OS XMarkus1-0/+1
2012-02-10fb-helper.c: remove unused FORMAT_ARRAY_SIZE defineFlorian Pritz1-1/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-10fb-helper.c: change format_bytes() arguments and buffer sizeFlorian Pritz1-7/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-10fb-helper.c: clean up curl options; set follow locationFlorian Pritz1-2/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-10fb-helper.c: remove unused warning for callback parametersFlorian Pritz1-1/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-10fb-helper.c: calculate a moving average of the upload speedFlorian Pritz1-5/+32
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-10fb-helper.c: calculate ETA for the uploadFlorian Pritz1-3/+36
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-26change license in manpageFlorian Pritz1-14/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-26fb.1: replace "folder" with "directory"Florian Pritz1-8/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-26fb.1: adapt for this branch; misc style changesFlorian Pritz1-37/+33
- reorder options alphabetically - remove BUGS section since it doesn't apply any more Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-26first draft of a mdoc(7) manpage replacing the podMoritz Wilhelmy4-91/+153
Conflicts: Makefile fb.pod Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-25add -# to reduce curl progress outputFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-25Makefile: replace install -D with -dFlorian Pritz1-3/+6
Signed-off-by: Florian Pritz <bluewind@server-speed.net>
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 Pritz4-52/+51
This makes the main script able to run alone again. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-25fb-helper.sh: base64 encode the filename if there is a commaFlorian Pritz1-2/+2
The server will decode this and use it instead of the filename sent with the file itself. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-25fb-helper.c: catch read() errorsFlorian Pritz1-0/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-04fix stat calls on non-gnu systemsFlorian Pritz4-4/+20
Reported-by: Moritz Wilhelmy <moritz+git@wzff.de> Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-04move to subdirectory in LIBDIRFlorian Pritz1-4/+5
This allows us to have more than one helper file Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-12-11add bash version of fb-helper.cFlorian Pritz2-0/+28
Using the bash helper can be forced by running "make LIBCURL=". Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-12-11use pkg-config instead of hardcoding compiler optionsFlorian Pritz1-2/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-12-10make it more obvious that we convert from micro seconds to secondsFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-12-10remove magic constantFlorian Pritz1-4/+5
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-10-09fb-helper.c: main() to increase readabilityFlorian Pritz1-42/+49
This moves some code, removes a big if/else by bailing early and adds comments. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-10-09fb-helper.c: improve readabilityFlorian Pritz1-9/+22
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-15use define instead of sed for VERSION expansion in helperFlorian Pritz3-9/+4
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-12remove unneeded temp variableFlorian Pritz1-3/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-12rewrite format_bytes()Florian Pritz2-15/+17
This removes the dependency on math.h/libm and is easier to understand. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-12improve error handlingFlorian Pritz2-20/+19
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 Pritz2-17/+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-15Merge branch 'history'Florian Pritz1-3/+27
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>