summaryrefslogtreecommitdiffstats
path: root/fb.in
diff options
context:
space:
mode:
Diffstat (limited to 'fb.in')
-rw-r--r--fb.in6
1 files 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