diff options
author | davidovski <david@davidovski.xyz> | 2022-01-30 22:30:25 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-01-30 22:30:25 +0000 |
commit | d1cdb90006b966f41b84ef7cf17ea2e87a4c7378 (patch) | |
tree | 2c1b1186ce81c6e120c0701ea66e3a61f54bffde /src/build.sh | |
parent | a5ab5c46c5b031fc46c05fbe5f7bb5f2a3945dad (diff) |
tidied output of the build system
Diffstat (limited to 'src/build.sh')
-rwxr-xr-x | src/build.sh | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/build.sh b/src/build.sh index b39e392..3073c3c 100755 --- a/src/build.sh +++ b/src/build.sh @@ -11,23 +11,30 @@ 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 | xargs realpath) - - printf $INFO - printf "Building %s...$RESET" $name - ./build_package.sh $buildfile && printf "$PASS passed\n" || return 1 - - # Install the package if it is needed for other builds - if echo $line | grep -q '+'; then - exported_pkg=$(find $XIB_EXPORT -wholename "*/$name.xipkg" | head -1 | xargs realpath) - if [ -f $exported_pkg ]; then - cd $XIB_CHROOT - tar -xf $exported_pkg - cd $OLDPWD - printf "$INFO\tInstalled %s$RESET\n" $name + 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" fi + + printf $RESET + printf "Finished building %s!\n" $name + else + printf "$ERROR$name does not exist\n" fi - done; + done } |