From: wangbiao Date: Tue, 21 Nov 2023 05:49:08 +0000 (+0900) Subject: use the correct lua to excutxe scripts X-Git-Tag: accepted/tools/devbase/tools/20250527.103727~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F34%2F301634%2F1;p=tools%2Fbuild.git use the correct lua to excutxe scripts Change-Id: I8ff682592f8f1c0b4c0615493f8df49a5aad7010 Signed-off-by: wangbiao --- diff --git a/build-pkg-rpm b/build-pkg-rpm index 607edf7..722079f 100644 --- a/build-pkg-rpm +++ b/build-pkg-rpm @@ -208,6 +208,9 @@ pkg_runscripts_rpm() { echo "running $PKG preinstall script" local prog read prog < "$BUILD_ROOT/.init_b_cache/scripts/$PKG.preprog" + if test "$prog" = "" ; then + prog="/usr/bin/lua" + fi (cd $BUILD_ROOT && chroot $BUILD_ROOT "${prog:-sh}" ".init_b_cache/scripts/$PKG.pre" 0) rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.pre" "$BUILD_ROOT/.init_b_cache/scripts/$PKG.preprog" fi @@ -215,6 +218,9 @@ pkg_runscripts_rpm() { echo "running $PKG postinstall script" local prog read prog < "$BUILD_ROOT/.init_b_cache/scripts/$PKG.postprog" + if test "$prog" = "" ; then + prog="/usr/bin/lua" + fi (cd $BUILD_ROOT && chroot $BUILD_ROOT "${prog:-sh}" ".init_b_cache/scripts/$PKG.post" 1) rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" "$BUILD_ROOT/.init_b_cache/scripts/$PKG.postprog" fi