handle the git '(no branch)' case
r3815 | dcl | 2012-11-22 10:09:54 +1100 (Thu, 22 Nov 2012) | 1 line
This commit is contained in:
@ -39,7 +39,7 @@ else
|
|||||||
git log -1 2>&1 >> /dev/null
|
git log -1 2>&1 >> /dev/null
|
||||||
if [ $? == 0 ]
|
if [ $? == 0 ]
|
||||||
then
|
then
|
||||||
SICS_VER="$(git branch | grep '^*' | cut -d ' ' -f 2)"
|
SICS_VER="$(git branch | grep '^*' | sed 's/^\* *//')"
|
||||||
SICS_REV="$(git log -1 --oneline | cut -d ' ' -f 1)"
|
SICS_REV="$(git log -1 --oneline | cut -d ' ' -f 1)"
|
||||||
else
|
else
|
||||||
SICS_VER="$USER"
|
SICS_VER="$USER"
|
||||||
|
Reference in New Issue
Block a user