Blame SOURCES/get-upstream-tarball.sh

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