summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap-main.sh13
-rwxr-xr-xbootstrap-stage1-build.sh30
2 files changed, 32 insertions, 11 deletions
diff --git a/bootstrap-main.sh b/bootstrap-main.sh
index be14830..d7cb1de 100755
--- a/bootstrap-main.sh
+++ b/bootstrap-main.sh
@@ -11,6 +11,7 @@ main()
SCRIPT_DIR="$(cd "${0%/*}" && pwd)"
setup_arch_plat
"${SCRIPT_DIR}/bootstrap-prepare.sh"
+ "${SCRIPT_DIR}/bootstrap-stage1-build.sh"
stage1
}
@@ -22,17 +23,7 @@ setup_arch_plat()
stage1()
{
- local dir opk elf_interp zlib_upstream_ver
-
- cd pkg
-
- for dir in */; do
- cd "${dir}"
- opkbuild -bC
- cd ..
- done
-
- cd ..
+ local opk elf_interp zlib_upstream_ver
[ -d "root_${ARCH}" ] && rm -Rf "root_${ARCH}"
mkdir "root_${ARCH}"
diff --git a/bootstrap-stage1-build.sh b/bootstrap-stage1-build.sh
new file mode 100755
index 0000000..ccee2e8
--- /dev/null
+++ b/bootstrap-stage1-build.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+main()
+{
+ cat <<-EOF
+ Building packages in stage 1...
+ ===============================
+ EOF
+
+ build_packages
+}
+
+build_packages()
+{
+ local dir
+
+ cd pkg
+
+ for dir in */; do
+ cd "${dir}"
+ opkbuild -bC
+ cd ..
+ done
+
+ cd ..
+}
+
+main "${@}"