iperf3-tls/make_release
2013-03-28 12:09:34 -05:00

36 lines
512 B
Bash
Executable File

#!/bin/sh
proj="iperf"
tag=`awk '/IPERF_VERSION / {
gsub(/"/, "", $3);
print $3 }' src/version.h`
dirname=`echo $tag $proj | awk '{
gsub(/-ALPHA/, "a", $1);
gsub(/-BETA/, "b", $1);
gsub(/-RELEASE/, "", $1);
print $2"-"$1 }'`
echo repo $repo
echo tag $tag
echo dirname $dirname
do_tag ()
{
hg tag -m "tagging $tag" $tag
}
do_tar ()
{
hg archive -t tgz -p ${dirname} -r ${tag} ${dirname}
}
case $1 in
tag) do_tag ;;
tar) do_tar ;;
*) echo "unknown command: $1" ;;
esac
exit