mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
3rdparty/kallisti5: Tool to compress running sysroot into a tar.gz
This commit is contained in:
parent
cef24e1a43
commit
453dc171ae
27
3rdparty/kallisti5/mksysroot.sh
vendored
Executable file
27
3rdparty/kallisti5/mksysroot.sh
vendored
Executable file
@ -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!"
|
Loading…
Reference in New Issue
Block a user