From 3d3511a9ce2eba02b4156618922b2ded02272307 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 2 Mar 2022 23:53:42 +0000 Subject: made a few optimisations on install --- xibuild/build_all.sh | 18 ++++++++---------- xibuild/build_package.sh | 5 +++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/xibuild/build_all.sh b/xibuild/build_all.sh index f4e30eb..a84d90f 100755 --- a/xibuild/build_all.sh +++ b/xibuild/build_all.sh @@ -6,6 +6,9 @@ PASS="\033[0;32m" NEUTRAL="\033[0;33m" RESET="\033[0m" +XIPKG_INSTALL=/usr/lib/xipkg/install.sh +[ -f $XIPKG_INSTALL ] && . $XIPKG_INSTALL + # scan and run all postinstall scripts # run_postinstall () { @@ -26,15 +29,6 @@ run_postinstall () { fi } -# install a single package if it is present -# -# arg: the exported .xipkg file -# -install_package () { - printf "${INFO}${TABCHAR}install " - xi -nyulq -r ${XIB_CHROOT} install $1 && printf "${PASS}${CHECKMARK}\n" -} - # build a package by its name # build_package () { @@ -51,7 +45,11 @@ build_package () { # install the package it exists local exported_pkg=$(find $XIB_EXPORT -wholename "*/$name.xipkg" | head -1 | xargs realpath) if $install && [ -f $exported_pkg ] ; then - install_package $exported_pkg + printf "${INFO}${TABCHAR}install " + INSTALLED_DIR="$XIB_CHROOT/var/lib/xipkg/installed/" + SYSROOT=$XIB_CHROOT + VERBOSE=false + install_package $exported_pkg $name && printf "${PASS}${CHECKMARK}\n" || printf "${NEUTRAL}${CHECKMARK}\n" fi return 0 diff --git a/xibuild/build_package.sh b/xibuild/build_package.sh index b099542..40c0e02 100755 --- a/xibuild/build_package.sh +++ b/xibuild/build_package.sh @@ -158,8 +158,9 @@ if command -v postinstall > /dev/null; then if [ ${#POSTINSTALL} != 0 ]; then POST_DIR=$PKG_DEST/var/lib/xipkg/postinstall mkdir -p $POST_DIR - echo "#!/bin/sh" > $POST_DIR/$PKG_NAME.sh - echo $POSTINSTALL >> $POST_DIR/$PKG_NAME.sh + cat /build/$PKG_NAME.xibuild > $POST_DIR/$PKG_NAME.sh + echo "" >> $POST_DIR/$PKG_NAME.sh + echo "postinstall" >> $POST_DIR/$PKG_NAME.sh fi else echo "no postinstall" -- cgit v1.2.1