]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
make.sh: Move lfscommoncheck out of run_command
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Jul 2024 10:18:49 +0000 (10:18 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 8 Jul 2024 15:39:44 +0000 (15:39 +0000)
We would quite likely create an infinite loop here later and so should
rather treat run_command as a low-level function.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index ef17d7460effca1fd917371757a806d1576542be..400f41689a027c5d215a5a39fabde4a085d292a2 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -774,10 +774,6 @@ run_command() {
                shift
        done
 
-       # Run the common check
-       lfsmakecommoncheck "${pkg}"
-       [ $? == 1 ] && return 0
-
        local command=(
                # Run a shell
                "bash"
@@ -823,6 +819,10 @@ run_command() {
 lfsmake2() {
        local pkg="${1}"
 
+       # Run the common check
+       lfsmakecommoncheck "${pkg}"
+       [ $? == 1 ] && return 0
+
        # Run install on the package
        if ! run_command --chroot "${pkg}" install; then
                exiterror "Building ${pkg}"
@@ -832,6 +832,10 @@ lfsmake2() {
 ipfiredist() {
        local pkg="${1}"
 
+       # Run the common check
+       lfsmakecommoncheck "${pkg}"
+       [ $? == 1 ] && return 0
+
        # Run dist on the package
        if ! run_command --chroot "${pkg}" dist; then
                exiterror "Packging ${pkg}"