X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tg-update.sh;h=50b29b426ac46acb8a427bc88d934ef5c57e3b23;hb=e5274deedc606f3a2eb69886e127a60534a82872;hp=563a62d8fbb293b4140fdd17067caf552d215e9c;hpb=5b78a37b9c29a106980ffe2f24e0dd6b2b60387c;p=topgit.git diff --git a/tg-update.sh b/tg-update.sh index 563a62d..50b29b4 100644 --- a/tg-update.sh +++ b/tg-update.sh @@ -21,7 +21,7 @@ base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ## First, take care of our base -depcheck="$(mktemp)" +depcheck="$(mktemp -t tg-depcheck.XXXXXX)" missing_deps= needs_update "$name" >"$depcheck" || : [ -z "$missing_deps" ] || die "some dependencies are missing: $missing_deps" @@ -39,8 +39,8 @@ if [ -s "$depcheck" ]; then 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