Blame SOURCES/get-upstream-tarball.sh

580d49
#!/bin/sh
580d49
#
580d49
# Mailx's upstream provides only the CVS method of downloading source code.
580d49
# This script can be used for downloading the CVS repository and creating
580d49
# the tarball.
580d49
#
580d49
# Usage:  ./get-upstream-tarball.sh
580d49
#
580d49
# This code is in the public domain; do with it what you wish.
580d49
#
580d49
# Copyright (C) 2012 Peter Schiffer <pschiffe@redhat.com>
580d49
#
580d49
580d49
newdir=new-upstream-tarball
580d49
580d49
mkdir $newdir
580d49
cd $newdir
580d49
580d49
# checkout cvs
580d49
echo "== Just press Enter =="
580d49
cvs -d:pserver:anonymous@nail.cvs.sourceforge.net:/cvsroot/nail login
580d49
cvs -d:pserver:anonymous@nail.cvs.sourceforge.net:/cvsroot/nail co nail
580d49
580d49
# remove CVS folders
580d49
rm -rf nail/CVS nail/catd/CVS
580d49
580d49
# find version in nail/version.c file defined as: #define V "xxx"
580d49
ver=$(sed -rn 's/#define\s+V\s+\"([0-9.]+)\"/\1/p' nail/version.c)
580d49
580d49
mv nail mailx-$ver
580d49
tar cJf mailx-$ver.tar.xz mailx-$ver
580d49
580d49
rm -rf mailx-$ver
580d49