Skip to content

Commit

Permalink
white space fixes for GEN-VERSION-FILE
Browse files Browse the repository at this point in the history
  • Loading branch information
the1ts committed Nov 24, 2024
1 parent 2d44830 commit 0920e48
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions GEN-VERSION-FILE
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ LF='
'

if test -d .git -o -f .git &&
VN=$(git describe --abbrev=0 --tags 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;
v[0-9]*)
git update-index -q --refresh
test -z "$(git diff-index --name-only HEAD --)" ||
VN="$VN-dirty"
;;
esac then
VN=$(echo "$VN" | sed -e 's/-/./g')
VN=$(git describe --abbrev=0 --tags 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;
v[0-9]*)
git update-index -q --refresh
test -z "$(git diff-index --name-only HEAD --)" ||
VN="$VN-dirty"
;;
esac then
VN=$(echo "$VN" | sed -e 's/-/./g')
else
VN="$DEF_VER"
VN="$DEF_VER"
fi

VN=$(expr "$VN" : v*'\(.*\)')

if test -r $VF; then
VC=$(sed -e 's/^VERSION=//' <$VF)
VC=$(sed -e 's/^VERSION=//' <$VF)
else
VC=unset
VC=unset
fi
test "$VN" = "$VC" || {
echo >&2 "VERSION=$VN"
echo "VERSION=$VN" >$VF
echo >&2 "VERSION=$VN"
echo "VERSION=$VN" >$VF
}

0 comments on commit 0920e48

Please sign in to comment.