From 94f4fc3c37e03296a54a9d934249898fde7f3b22 Mon Sep 17 00:00:00 2001 From: Moritz Wilhelmy Date: Wed, 14 Mar 2012 00:32:16 +0100 Subject: fix stat and clipboard calls for Darwin --- fb.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fb.in b/fb.in index 4c1eacf..3716bd9 100644 --- a/fb.in +++ b/fb.in @@ -27,10 +27,12 @@ CLIPBOARD="" EXITCODE=0 # the calling conventions for stat(1) are highly system dependent -STAT='stat -c %s' # GNU stat(1) is the default since most people have it +STAT='stat -c %s' # GNU stat(1) is the default since most people have it +CLIPBOARD_CMD=xclip # also default to X11 case "`uname -s`" in *BSD) STAT='stat -f %z';; Minix) STAT='stat -size';; + Darwin)STAT='stat -f %z'; CLIPBOARD_CMD=pbcopy;; esac do_upload() { @@ -192,7 +194,7 @@ else fi if [ "$CLIPBOARD" != "" ]; then - type xclip >/dev/null 2>&1 && echo -n $CLIPBOARD | nohup xclip >/dev/null 2>&1 + type $CLIPBOARD_CMD >/dev/null 2>&1 && echo -n $CLIPBOARD | nohup $CLIPBOARD_CMD >/dev/null 2>&1 fi exit $EXITCODE -- cgit v1.2.3-24-g4f1b