From 72350301482cf2c76bb9f2529f3f99b7a28d1931 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 14 Mar 2012 00:02:29 +0100 Subject: unify `uname -s` cases Signed-off-by: Florian Pritz --- fb.in | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fb.in b/fb.in index c211d83..52447a6 100644 --- a/fb.in +++ b/fb.in @@ -26,9 +26,16 @@ LIBDIR="@LIBDIR@" # 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 + +CLIPBOARD_CMD=xclip + case "`uname -s`" in - *BSD|Darwin) STAT='stat -f %z';; + *BSD) STAT='stat -f %z';; Minix) STAT='stat -size';; + Darwin) + STAT='stat -f %z' + CLIPBOARD_CMD=pbcopy + ;; esac base64_encode() { @@ -288,10 +295,6 @@ else fi if [ "$CLIPBOARD" != "" ]; then - case "`uname -s`" in - Darwin) CLIPBOARD_CMD=pbcopy;; - *) CLIPBOARD_CMD=xclip;; - esac type $CLIPBOARD_CMD >/dev/null 2>&1 && echo -n $CLIPBOARD | nohup $CLIPBOARD_CMD >/dev/null 2>&1 fi -- cgit v1.2.3-24-g4f1b