diff options
Diffstat (limited to 'fb-helper.sh.in')
-rw-r--r-- | fb-helper.sh.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fb-helper.sh.in b/fb-helper.sh.in index 3a4e3b2..e6868f6 100644 --- a/fb-helper.sh.in +++ b/fb-helper.sh.in @@ -4,12 +4,16 @@ mode=$1 url=$2 file=$3 +LIBDIR="@LIBDIR@" + +source "$LIBDIR/functions" + USERAGENT="fb-client/shell-@VERSION@" CURLOPTS="-n -L -A $USERAGENT" if [ "$mode" = "u" ]; then basefilename=`basename -- "$file"` - if [ `stat -c %s -- "$file"` -eq "0" ] || echo "$basefilename" | grep -F -q ","; then + if [ `$STAT -- "$file"` -eq "0" ] || echo "$basefilename" | grep -F -q ","; then basefilename=`echo "$basefilename" | tr -d ,` curl $CURLOPTS -F "file=@-;filename=$basefilename" "$url" < "$file" -o /dev/stdout else |