From 539e3027d80b939c27b5240782e2d01faf4241da Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 29 May 2022 00:40:45 +0100 Subject: fixed not rebuilding installed packages --- src/build.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/build.sh') diff --git a/src/build.sh b/src/build.sh index 29a6398..8297f25 100644 --- a/src/build.sh +++ b/src/build.sh @@ -12,9 +12,10 @@ get_buildfiles () { git rev-parse --git-dir && git pull || git clone $BUILDFILES_GIT . - } > $(${VERBOSE}&&echo "/dev/stdout" || echo "/dev/null") 2>&1 && { + } > $(${VERBOSE} && echo "/dev/stdout" || echo "/dev/null") 2>&1 && { ${QUIET} || printf "${GREEN}${CHECKMARK}\n" } + cd - } get_deps () { @@ -24,12 +25,17 @@ get_deps () { } build_order () { + checked="" while [ "$#" != "0" ]; do name=$1 shift for dep in $(get_deps $name); do - set -- $@ $dep - echo $name $dep + [ -z "${checked##*$name*}" ] && { + checked="$checked $name" + set -- $@ $dep + echo $name $dep + ${VERBOSE} && echo "checking $name" 1>&2 + } done done | tsort | reverse_lines } @@ -79,7 +85,9 @@ build () { set -- for p in $pkgs; do - needs_build $p && set -- $@ $p + needs_build $p || [ -z ${mentioned##*$p*} ] && { + set -- $@ $p + } done printf "${LIGHT_BLUE}The following packages will be built: \n" -- cgit v1.2.1