From 98ccb3a2d41015b42d46d8b382decc755a003c3f Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 4 Jun 2024 13:41:11 -0400 Subject: project: Initial commit Signed-off-by: Ian Moffett --- bootstrap | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 bootstrap (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..f2e2cae --- /dev/null +++ b/bootstrap @@ -0,0 +1,56 @@ +#!/bin/sh +set -e + +mkdir -p lib/ + +# arg0: Output path. +# arg1: Command for downloading +try_fetch() { + if [[ -d $2 ]] + then + echo "try_fetch: Skipping $2: already exists" + else + ${@:1} + fi +} + +fetch() { + try_fetch "git clone https://github.com/limine-bootloader/limine.git --branch=v6.x-branch-binary --depth=1" "stand/limine" +} + +build_limine() { + make -C stand/limine/ +} + +build_kconf() { + make -C tools/kconf/ +} + +build() { + build_limine + build_kconf +} + +echo "----------------------------------" +echo +echo " Fetching sources... " +echo +echo "----------------------------------" +echo -e "\n" + +fetch # Fetch sources + +echo "----------------------------------" +echo +echo " Building sources... " +echo +echo "----------------------------------" +echo -e "\n" + +build # Build sources + +if [[ ! -f ./configure ]] +then + echo "Creating configure script..." + autoconf +fi -- cgit v1.2.3