mailx/get-upstream-tarball.sh
Petr Šabata c4ee57973e RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/mailx#3506e1fce192ba16fb19910b41781ec99829e114
2020-10-15 18:54:14 +02:00

35 lines
848 B
Bash
Executable File

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