From c3510ace839d9edef1df08ae65d07ae0e3ed015a Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Mon, 30 May 2011 09:52:08 +0000 Subject: [PATCH] When building floppy boot image on FreeBSD, the stat command line fail on the -c/--format option which is unsupported on this platform. Add a fallback, which should fix #7613. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41829 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/ImageRules | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/jam/ImageRules b/build/jam/ImageRules index e2935b17ce..3dc5257f95 100644 --- a/build/jam/ImageRules +++ b/build/jam/ImageRules @@ -1382,7 +1382,11 @@ rule BuildFloppyBootImage image : haikuLoader : archive actions BuildFloppyBootImage1 { - haiku_loader_size=`stat -c %s $(>[1])` + haiku_loader_size=`stat -c %s "$(>[1])"` + if [ $? -ne 0 ] ; then + # FreeBSD's stat command don't support -c/--format option + haiku_loader_size=`stat -f %s "$(>[1])"` + fi archive_image_offset=`echo "$(ARCHIVE_IMAGE_OFFSET) * 1024" | bc` if [ $haiku_loader_size -gt $archive_image_offset ] ; then echo "Error: $(>[1]) is too big ($haiku_loader_size) to fit "