summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-06-24 23:00:41 -0400
committerIan Moffett <ian@osmora.org>2024-06-24 23:00:41 -0400
commit963478ff0ad358fc3a44ff5dba0c64ddc889f296 (patch)
treea14c3ea6feb7d1b783364737fcefabce249473ff /bootstrap
parent236963e7563be3e3f8220dac7bb4af446928e194 (diff)
parent6f6a36d1e8b3dd50cb4d394fa1de4888663b4ea5 (diff)
Import hyra expt
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap56
1 files changed, 56 insertions, 0 deletions
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