freeswitch/scripts/ci/src_tarball.sh

51 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
2012-05-06 02:58:16 +00:00
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
2012-05-07 20:56:45 +00:00
check_pwd
2012-05-07 22:39:39 +00:00
check_input_ver_build $@
2012-05-06 02:58:16 +00:00
eval $(parse_version "$1")
2012-11-30 17:19:32 +00:00
if [ -n "$grev" ]; then
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$grev"
else
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
fi
dst_dir="${tmp_dir}/jenkins.$$/$dst_name"
if [ -d "$dst_dir" ]; then
echo "error: destination directory $dst_dir already exists." 1>&2
exit 1;
fi
mkdir -p $dst_dir
cp -r . $dst_dir
cd $dst_dir
set_fs_ver "$gver" "$gmajor" "$gminor" "$gmicro" "$grev"
echo "$gver" > .version
gnuize
cd ..
ls
2012-05-06 01:52:50 +00:00
tar -cvf ${dst_name}.tar $dst_name
2012-05-06 01:52:50 +00:00
# gzip -9 -c ${dst_name}.tar > $dst_name.tar.gz || echo "gzip not available"
bzip2 -z -k ${dst_name}.tar || echo "bzip2 not available"
# xz -z -9 -k ${dst_name}.tar || echo "xz / xz-utils not available"
2012-05-06 01:52:50 +00:00
rm -rf ${dst_name}.tar $dst_dir
2012-05-06 01:52:50 +00:00
mkdir -p ${src_repo}/src_dist
mv -f ${dst_name}.tar.* ${src_repo}/src_dist
cat 1>&2 <<EOF
----------------------------------------------------------------------
The freeswitch-${cver} tarballs have been rolled,
now we just need to roll packages with them
----------------------------------------------------------------------
EOF