Debian Codegraph @

devel-tools/repo-status

raw
1 #! /usr/bin/env bash
2 #
3 # Helper for check-release.
4
5 repo=`basename \`git config --get remote.origin.url\` | sed 's/^[^:]*://'`
6 head=`basename \`git symbolic-ref -q HEAD\``
7
8 update_changes="`dirname $0`/update-changes"
9
10 printf "%20s " "$repo"
11 printf "%-10s " "$head"
12 printf "%-8s " `$update_changes -c | grep -q NOT && echo 'old!' || echo ok`
13 printf "%-8s " `git log --oneline $head ^origin/$head | wc -l | awk '$1==0{printf("%s",$1)} $1!=0{printf("%s!",$1)}'`
14 printf "%-7s " `git status --porcelain | awk 'NF!=1' | grep -q '.' && echo 'Mod!' || echo ok`
15 printf "%-5s " `git submodule status --recursive | sed 's/^\(\.\).*/\1/g' | grep -q '^ $' && echo 'Mod!' || echo ok`
16 printf "%-15s " `cat VERSION | awk '/-/{printf("%s!", $1); next} {printf("%s", $1)}'`
17 printf "%s" `git tag -l --contains HEAD | sort -r | paste -sd ',' | awk '/release|beta/{printf("%s",$1); next;} {printf("%s!",$1)}'`
18 echo