diff options
author | Moritz Wilhelmy <moritz+git@wzff.de> | 2012-03-14 00:32:16 +0100 |
---|---|---|
committer | Moritz Wilhelmy <moritz+git@wzff.de> | 2012-03-14 00:32:16 +0100 |
commit | 94f4fc3c37e03296a54a9d934249898fde7f3b22 (patch) | |
tree | 826fa05759776a67839835d8ba8671a5ff8728ef | |
parent | 400edb7fc13a5b3aa12040c82504b175c7f0982e (diff) |
fix stat and clipboard calls for Darwin
-rw-r--r-- | fb.in | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |