#!/bin/bash test -d .git || ( echo "Not a git repo!" ; exec /bin/false ) VERSION=$(git describe | awk -F- '{ if ( NF == 4 ) print $NF }') if [ -n "$VERSION" ]; then ARGS="--append-to-version -${VERSION}-2" else ARGS="" fi #ARGS="--append-to-version -6" time fakeroot make-kpkg --uc --us -j4 ${ARGS} --revision 1 kernel_image