depcheck="$(mktemp)"
missing_deps=
-needs_update "$name" >"$depcheck"
+needs_update "$name" >"$depcheck" || :
[ -z "$missing_deps" ] || die "some dependencies are missing: $missing_deps"
if [ -s "$depcheck" ]; then
# We need to switch to the base branch
sed 's/^\([^+]\)/-\1/' | # now each line is +branch or -branch (+ == recurse)
uniq -s 1 | # fold branch lines; + always comes before - and thus wins within uniq
while read depline; do
- action="${depline:0:1}"
- dep="${depline:1}"
+ action="$(echo "$depline" | cut -c 1)"
+ dep="$(echo "$depline" | cut -c 2-)"
# We do not distinguish between dependencies out-of-date
# and base out-of-date cases for $dep here, but thanks