diff options
author | Bjoern Tropf <asym@gentoo.org> | 2009-12-19 12:53:55 +0100 |
---|---|---|
committer | Bjoern Tropf <asym@gentoo.org> | 2009-12-19 12:53:55 +0100 |
commit | 26edc0e62dfadfb032306458300fb5437aca42e7 (patch) | |
tree | 88b55a2bbefc82faf5ec45d9458349c47072734f /tools | |
parent | Fix invalid CVSS data (diff) | |
download | kernel-check-26edc0e62dfadfb032306458300fb5437aca42e7.tar.gz kernel-check-26edc0e62dfadfb032306458300fb5437aca42e7.tar.bz2 kernel-check-26edc0e62dfadfb032306458300fb5437aca42e7.zip |
Rename findcommit.sh to fcommit
Fix some bugs
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/findcommit.sh | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/tools/findcommit.sh b/tools/findcommit.sh deleted file mode 100755 index be1814f..0000000 --- a/tools/findcommit.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh -# kernel-check -- Gentoo Kernel Security -# Copyright 2009-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -TEXT=".*$@.*" -GITPATH="./" - -KNOWNCOMMITS="" -LASTFIXEDBRANCH="" -WHITEBOARD="" - -GOOD=$'\e[32;01m' -BAD=$'\e[31;01m' -BRACKET=$'\e[34;01m' -NORMAL=$'\e[0m' - -GITPATH="--git-dir=$GITPATH.git --work-tree=$GITPATH" -BRANCHES="`git $GITPATH branch -a | grep linux` origin/master" -for B in $BRANCHES ; do - COMMITS="`git $GITPATH rev-list --pretty=oneline "$B" | - grep "$TEXT" | cut -d " " -f 1`" - for C in $COMMITS ; do - if [ "${KNOWNCOMMITS/$C/}" == "$KNOWNCOMMITS" ] ; then - TAG="`git $GITPATH describe --contains --all "$C"`" - DESC="`git $GITPATH --no-pager log -1 --pretty=short "$C"`" - DESC="`echo "$DESC" | tr -s "\n" `" - DESC="${TAG/tags\//\n${GOOD}label${NORMAL} }\n${DESC}" - DESC="${DESC/commit/${GOOD}commit${NORMAL}}" - DESC="${DESC/Author:/${GOOD}author${NORMAL}}" - DESC="${DESC/ /${GOOD}title${NORMAL} ${BRACKET}}${NORMAL}\n" - echo -e "$DESC" - - VERSION="${TAG/tags\/v/}" - VERSION="${VERSION/~*/}" - VERSION="${VERSION/^*/}" - - if [ "$B" != "origin/master" ] ; then - THISBRANCH="${B/remotes\/origin\/linux-/}" - THISBRANCH="${THISBRANCH/.y/}" - REVISION="${THISBRANCH/*./}" - MAJORMINOR="${THISBRANCH/.${REVISION}/}" - let REVISION=REVISION+1 - NEXTBRANCH="${MAJORMINOR}.${REVISION}" - fi - if [ -z "$LASTFIXEDBRANCH" ] ; then - WHITEBOARD="$WHITEBOARD [linux <${VERSION}]" - else - if [ "${LASTFIXEDBRANCH}" == "${VERSION/-rc*/}" ] ; then - WHITEBOARD="${WHITEBOARD} ${BAD}[linux >=" \ - "${LASTFIXEDBRANCH} <${VERSION}]${NORMAL}" - else - WHITEBOARD="${WHITEBOARD} [linux >=" \ - "${LASTFIXEDBRANCH} <${VERSION}]" - fi - fi - LASTFIXEDBRANCH=$NEXTBRANCH - KNOWNCOMMITS="$KNOWNCOMMITS $C" - fi - done -done -echo -e "${GOOD}Whiteboard${NORMAL}\n${WHITEBOARD:1}\n" |