diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-03-14 00:02:29 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-03-14 00:02:29 +0100 |
commit | 72350301482cf2c76bb9f2529f3f99b7a28d1931 (patch) | |
tree | 3eb80e4c8dcba9cdd0de6a928106cccee81dab99 | |
parent | 73e46ce273334f7252c2b783796b52457e402d8b (diff) |
unify `uname -s` cases
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | fb.in | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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 |