Browse Source

Suppress error when on detached head

pull/1/head
Richard Wackerbarth 10 years ago
parent
commit
b3a3080b4b
  1. 5
      LinuxAddons/bin/generate_version_header_for_marlin

5
LinuxAddons/bin/generate_version_header_for_marlin

@ -13,8 +13,8 @@ echo "#define BUILD_UNIX_DATETIME" `date +%s` >>"$OUTFILE"
echo "#define STRING_DISTRIBUTION_DATE" `date '+"%Y-%m-%d %H:%M"'` >>"$OUTFILE" echo "#define STRING_DISTRIBUTION_DATE" `date '+"%Y-%m-%d %H:%M"'` >>"$OUTFILE"
( set +e ( set +e
cd "$DIR" cd "$DIR"
BRANCH=`git symbolic-ref --short HEAD` BRANCH=`git symbolic-ref -q --short HEAD`
if [ "x$BRANCH" == "xHEAD" ] ; then if [ "x$BRANCH" == "x" ] ; then
BRANCH="" BRANCH=""
elif [ "x$BRANCH" == "xDevelopment" ] ; then elif [ "x$BRANCH" == "xDevelopment" ] ; then
BRANCH=" dev" BRANCH=" dev"
@ -31,5 +31,4 @@ echo "#define STRING_DISTRIBUTION_DATE" `date '+"%Y-%m-%d %H:%M"'` >>"$OUTFILE"
echo "// Deprecated URL definition" >>"$OUTFILE" echo "// Deprecated URL definition" >>"$OUTFILE"
echo "#define FIRMWARE_URL \""$URL"\"" >>"$OUTFILE" echo "#define FIRMWARE_URL \""$URL"\"" >>"$OUTFILE"
fi fi
) )

Loading…
Cancel
Save