[Xfce4-commits] [xfce/xfce4-settings] 01/01: On BSD systems, stat command has option '-f' instead of '-c'

noreply at xfce.org noreply at xfce.org
Mon Feb 16 05:28:19 CET 2015


This is an automated email from the git hooks/post-receive script.

bluesabre pushed a commit to branch master
in repository xfce/xfce4-settings.

commit 4df7dbd3e50f08d2e039a1cb36733a7dfef0a245
Author: Olivier Duchateau <duchateau.olivier at gmail.com>
Date:   Sun Feb 15 20:55:05 2015 +0000

    On BSD systems, stat command has option '-f' instead of '-c'
    
    Signed-off-by: Sean Davis <smd.seandavis at gmail.com>
---
 dialogs/appearance-settings/appearance-install-theme |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dialogs/appearance-settings/appearance-install-theme b/dialogs/appearance-settings/appearance-install-theme
index 6dc1e17..6391595 100755
--- a/dialogs/appearance-settings/appearance-install-theme
+++ b/dialogs/appearance-settings/appearance-install-theme
@@ -89,7 +89,11 @@ fi
 
 # check file size, abort if bigger then 50Mb, only works for files
 if test x"`which stat 2>/dev/null`" != x""; then
-    dndsize=`stat -c %s "$dndfilename"`
+		if [ "`uname -s`" = "DragonFly" ] || [ "`uname -s`" = "FreeBSD" ] || [ "`uname -s`" = "NetBSD" ] || [ "`uname -s`" = "OpenBSD" ]; then
+				dndsize=`stat -f %z "$dndfilename"`
+		else
+				dndsize=`stat -c %s "$dndfilename"`
+		fi
     if test "$dndsize" -gt 52428800; then
         # 2: File too big
         exit 2

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list