[haiku-commits] BRANCH haiku.master [453dc171ae98] 3rdparty/kallisti5

  • From: haiku.master <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 13 Dec 2017 17:55:33 +0100 (CET)

added 1 changeset to branch 'refs/remotes/haiku/master'
old head: cef24e1a439c5dbf02e06f730e97be356aa99be9
new head: 453dc171ae98f9d9ca4b9d4f68885f83b386fadb

----------------------------------------------------------------------------

453dc171ae98: 3rdparty/kallisti5: Tool to compress running sysroot into a tar.gz

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Commit:      453dc171ae98f9d9ca4b9d4f68885f83b386fadb
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Wed Dec 13 14:36:33 2017 UTC

----------------------------------------------------------------------------

1 file changed, 27 insertions(+)
3rdparty/kallisti5/mksysroot.sh | 27 +++++++++++++++++++++++++++

----------------------------------------------------------------------------

diff --git a/3rdparty/kallisti5/mksysroot.sh b/3rdparty/kallisti5/mksysroot.sh
new file mode 100755
index 0000000..4777694
--- /dev/null
+++ b/3rdparty/kallisti5/mksysroot.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Creates a sysroot from a running Haiku system suitable
+# for bootstrapping / cross-compiling Haiku applications
+# under other platforms.
+#
+# Resulting tar.gz is generally extracted at cross-tools-$ARCH/sysroot
+#
+
+OS=$(uname -o)
+ARCH=$(uname -p)
+REV=$(uname -v | awk '{ print $1 }')
+
+EXCLUDE="/boot/system/packages /boot/system/var/swap"
+
+OUTPUT="sysroot-$OS-$ARCH-$REV.tar.gz"
+
+echo "Generating $ARCH sysroot..."
+
+tar $(for i in $EXCLUDE; do echo "--exclude $i"; done) -cvzf $OUTPUT 
/boot/system /bin /etc /packages /system /tmp
+
+if [ $? -ne 0 ]; then
+       echo "Error creating sysroot package!"
+       return 1;
+fi
+
+echo "sysroot $OUTPUT successfully created!"


Other related posts: