summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-29 00:40:45 +0100
committerdavidovski <david@davidovski.xyz>2022-05-29 00:40:45 +0100
commit539e3027d80b939c27b5240782e2d01faf4241da (patch)
tree72833a759406b8f8131e4a6a1767793cdf6bb3a8
parent1750e844bab1dd5f1b69d3fb2b8f6eb1fbc9f9b5 (diff)
fixed not rebuilding installed packages
-rw-r--r--src/build.sh16
1 files changed, 12 insertions, 4 deletions
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"