summaryrefslogtreecommitdiff
path: root/makepkg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-05-21 11:44:13 +0100
committerV3n3RiX <venerix@rogentos.ro>2016-05-21 11:44:13 +0100
commit34b4ee0f3bdf46ef2d9a9151cf17add400a0a6c8 (patch)
tree8c2744015256da817d0e91743c4cc41d0acda491 /makepkg
parent3bca8966cfbe0ec58e3a58cc4a592b7002b0e1c6 (diff)
small improvements
Diffstat (limited to 'makepkg')
-rwxr-xr-xmakepkg41
1 files changed, 41 insertions, 0 deletions
diff --git a/makepkg b/makepkg
new file mode 100755
index 0000000..3121bf4
--- /dev/null
+++ b/makepkg
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+# Vasile needs root privileges and a proper kernel to run
+
+kernelconfig
+checkroot
+
+chrootprepare () {
+ # check our environment for sanity
+ # if safe, trigger start && break the loop to build packages
+ # else trigger stop && cleanup && check again
+ while : true ; do
+ if [[ ! -d "$rodir" && ! -d "$rwdir" && ! -d "$workdir" && ! -d "$overlaydir" ]] ; then
+ for i in "$rodir" "$rwdir" "$workdir" "$overlaydir" ; do
+ mkdir "$i"
+ done
+ chrootstart
+ break
+ elif [[ -d "$rodir" && -d "$rwdir" && -d "$workdir" && -d "$overlaydir" ]] ; then
+ chrootstop
+ for i in "$rodir" "$rwdir" "$workdir" "$overlaydir" ; do
+ rm -rf "$i"
+ done
+ continue
+ fi
+ done
+}
+
+main () {
+ chrootchecksum
+ chrootprepare
+ chrootoverlays
+ chrootbuildsystem
+ chrootdevtree
+ chrootbuild
+ chrootx64
+ chrootstop
+}
+
+main
+exit 0