summaryrefslogtreecommitdiff
path: root/src/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/build.sh')
-rwxr-xr-xsrc/build.sh64
1 files changed, 34 insertions, 30 deletions
diff --git a/src/build.sh b/src/build.sh
index b94b8d3..b4e8f6d 100755
--- a/src/build.sh
+++ b/src/build.sh
@@ -8,40 +8,44 @@ RESET="\033[0m"
source prepare_environment.sh
-build_all () {
- for line in $(perl build_order.pm); do
- name=$(echo $line | cut -d"+" -f1)
- buildfile=$(find $XIB_BUILDFILES -wholename "*/$name.xibuild" | head -1)
-
- if [ -f "$buildfile" ]; then
- printf $INFO
- printf "Building$NEUTRAL %s$INFO:\n$RESET" $name
- ./build_package.sh $buildfile || return 1
-
- # Install the package if it is needed for other builds
- if echo $line | grep -q '+'; then
- printf "$INFO\tInstalling..."
- exported_pkg=$(find $XIB_EXPORT -wholename "*/$name.xipkg" | head -1 | xargs realpath)
- if [ -f $exported_pkg ]; then
- tar -h --no-overwrite-dir -xf $exported_pkg -C $XIB_CHROOT
- fi
-
- printf "$PASS installed to chroot!\n"
+build_package () {
+ name=$(echo $line | cut -d"+" -f1)
+ buildfile=$(find $XIB_BUILDFILES -wholename "*/$name.xibuild" | head -1)
+
+ if [ -f "$buildfile" ]; then
+ printf $INFO
+ printf "Building$NEUTRAL %s$INFO:\n$RESET" $name
+ ./build_package.sh $buildfile || return 1
+
+ # Install the package if it is needed for other builds
+ if echo $line | grep -q '+'; then
+ printf "$INFO\tInstalling..."
+ exported_pkg=$(find $XIB_EXPORT -wholename "*/$name.xipkg" | head -1 | xargs realpath)
+ if [ -f $exported_pkg ]; then
+ tar -h --no-overwrite-dir -xf $exported_pkg -C $XIB_CHROOT
fi
- printf $RESET
- printf "Finished building %s!\n" $name
- else
- printf "$ERROR$name does not exist\n"
+ printf "$PASS installed to chroot!\n"
fi
- # configure shadow here
- if [ "$name" = "shadow" ];
- xichroot "$XIB_CHROOT" /usr/sbin/pwconv
- xichroot "$XIB_CHROOT" /usr/sbin/grpconv
- xichroot "$XIB_CHROOT" "mkdir -p /etc/default"
- xichroot "$XIB_CHROOT" "useradd -D --gid 999"
- fi
+ printf $RESET
+ printf "Finished building %s!\n" $name
+ else
+ printf "$ERROR$name does not exist\n"
+ fi
+
+ # configure shadow here
+ if [ "$name" = "shadow" ]; then
+ xichroot "$XIB_CHROOT" "/usr/sbin/pwconv"
+ xichroot "$XIB_CHROOT" "/usr/sbin/grpconv"
+ xichroot "$XIB_CHROOT" "mkdir -p /etc/default"
+ xichroot "$XIB_CHROOT" "/usr/sbin/useradd -D --gid 999"
+ fi
+}
+
+build_all () {
+ for line in $(perl build_order.pm); do
+ build_package $line || return 1
done
}