summaryrefslogtreecommitdiff
path: root/bootstrap.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-15 17:03:28 +0100
committerdavidovski <david@davidovski.xyz>2022-05-15 17:03:28 +0100
commite5b726782e317ae4306a34d065171fd66a417186 (patch)
treed3bd2df93184daff38ea31ee593e695e40f59e38 /bootstrap.sh
parentb273972f3fcbc84c9114d32646c2ae3e46dd1590 (diff)
removed broken bootstrap
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh65
1 files changed, 65 insertions, 0 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 0000000..974dd86
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+toolchaindest="$xib_dir/chroot-toolchain"
+
+toolchainpackages="
+musl
+linux-headers
+llvm
+clang
+clang-tools-extra
+libcxx
+libcxxabi
+libunwind
+lld
+libexecinfo
+ncurses
+tcl
+expect
+dejagnu
+m4
+dash
+bison
+bzip2
+sbase
+sort
+ubase
+findutils
+diffutils
+gettext
+gzip
+grep
+make
+patch
+perl
+sed
+tar
+texinfo
+xz
+flex
+toolchain-cmake
+ninja
+"
+
+bootstrap () {
+ mkdir -p $toolchaindest
+ rm -rf $stage
+ mkdir -p $stage
+ xi -nyl -r $toolchaindest bootstrap
+
+ for pkg in $toolchainpackages; do
+ pkg_build=$(get_package_build $pkg)
+ parent=$(basename $pkg_build)
+ [ ! -d "$stage/$parent" ] && mkdir -p $stage/$parent
+ [ ! -f $stage/$parent/$pkg.xipkg ] && {
+ xibuild -v -k $keychain/$priv_key -c $pkg_build -d $stage/$parent -r $chroot || return 1
+ }
+ echo "Installing $pkg"
+ xi -r $toolchaindest install $stage/$parent/$pkg.xipkg
+ done
+
+ printf "creating tarball...\n"
+ output="xib-chroot-tools-$(date +%y%m%d).tar.xz"
+ tar -C $toolchaindest -cJf $output ./
+}
+