mwrap.git  about / heads / tags
LD_PRELOAD malloc wrapper + line stats for Ruby
blob 35dab9d01129a223d3c16d525335e42896653101 527 bytes (raw)
$ git show HEAD:VERSION-GEN	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
#!/bin/sh
VF=lib/mwrap/version.rb
DEF_VER=v3.0.0-pre1
VN=$(git describe HEAD 2>/dev/null)
if test $? -eq 0
then
	case "$VN" in
	v[0-9]*)
		set -e
		git update-index -q --refresh
		set +e
		git diff-index --quiet HEAD -- || VN="$VN-dirty"
		set -e
		VN=$(echo $VN | tr '-' '.')
		;;
	esac
fi
set -e

case $VN in
'') VN="$DEF_VER" ;;
esac

VN=$(expr "$VN" : v*'\(.*\)')
VC=unset
if test -r $VF
then
	VC="$(cat $VF)"
fi

new="module Mwrap; VERSION = '$VN'.freeze; end"
if test x"$new" != x"$VC"
then
	echo "$new" >$VF
fi
echo $VN

git clone https://80x24.org/mwrap.git