summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authornishi <nishi@vegaa.systems>2023-07-07 23:40:27 +0000
committernishi <nishi@vegaa.systems>2023-07-07 23:40:27 +0000
commitd963772c6633a0610898aaba2ae90d461e8f2de8 (patch)
tree64d9e0a7b09b205d5f42011aa2bfe88e321f706d /bootstrap
should be working, should be
git-svn-id: https://svn.vegaa.systems/svn/vega-Vega/trunk@7 a8a8aea2-181d-ee11-89e8-15fd0e089fc4
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap51
1 files changed, 51 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
new file mode 100755
index 0000000..aee2add
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,51 @@
+#!/bin/bash
+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=v4.x-branch-binary --depth=1" "stand/limine"
+}
+
+build_limine() {
+ make -C stand/limine/
+}
+
+build() {
+ build_limine
+}
+
+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