head	1.1;
branch	1.1.1;
access;
symbols
	RELENG_8_4:1.1.1.3.0.52
	RELENG_9_1_0_RELEASE:1.1.1.3
	RELENG_9_1:1.1.1.3.0.50
	RELENG_9_1_BP:1.1.1.3
	RELENG_8_3_0_RELEASE:1.1.1.3
	RELENG_8_3:1.1.1.3.0.48
	RELENG_8_3_BP:1.1.1.3
	RELENG_9_0_0_RELEASE:1.1.1.3
	RELENG_9_0:1.1.1.3.0.46
	RELENG_9_0_BP:1.1.1.3
	RELENG_9:1.1.1.3.0.44
	RELENG_9_BP:1.1.1.3
	RELENG_7_4_0_RELEASE:1.1.1.3
	RELENG_8_2_0_RELEASE:1.1.1.3
	RELENG_7_4:1.1.1.3.0.42
	RELENG_7_4_BP:1.1.1.3
	RELENG_8_2:1.1.1.3.0.40
	RELENG_8_2_BP:1.1.1.3
	RELENG_8_1_0_RELEASE:1.1.1.3
	RELENG_8_1:1.1.1.3.0.38
	RELENG_8_1_BP:1.1.1.3
	RELENG_7_3_0_RELEASE:1.1.1.3
	RELENG_7_3:1.1.1.3.0.36
	RELENG_7_3_BP:1.1.1.3
	RELENG_8_0_0_RELEASE:1.1.1.3
	RELENG_8_0:1.1.1.3.0.34
	RELENG_8_0_BP:1.1.1.3
	RELENG_8:1.1.1.3.0.32
	RELENG_8_BP:1.1.1.3
	RELENG_7_2_0_RELEASE:1.1.1.3
	RELENG_7_2:1.1.1.3.0.30
	RELENG_7_2_BP:1.1.1.3
	RELENG_7_1_0_RELEASE:1.1.1.3
	RELENG_6_4_0_RELEASE:1.1.1.3
	RELENG_7_1:1.1.1.3.0.28
	RELENG_7_1_BP:1.1.1.3
	RELENG_6_4:1.1.1.3.0.26
	RELENG_6_4_BP:1.1.1.3
	RELENG_7_0_0_RELEASE:1.1.1.3
	RELENG_6_3_0_RELEASE:1.1.1.3
	RELENG_7_0:1.1.1.3.0.24
	RELENG_7_0_BP:1.1.1.3
	RELENG_6_3:1.1.1.3.0.22
	RELENG_6_3_BP:1.1.1.3
	RELENG_7:1.1.1.3.0.20
	RELENG_7_BP:1.1.1.3
	RELENG_6_2_0_RELEASE:1.1.1.3
	v5_2:1.1.1.3
	RELENG_6_2:1.1.1.3.0.18
	RELENG_6_2_BP:1.1.1.3
	RELENG_5_5_0_RELEASE:1.1.1.3
	RELENG_5_5:1.1.1.3.0.16
	RELENG_5_5_BP:1.1.1.3
	RELENG_6_1_0_RELEASE:1.1.1.3
	RELENG_6_1:1.1.1.3.0.14
	RELENG_6_1_BP:1.1.1.3
	v5_1:1.1.1.3
	RELENG_6_0_0_RELEASE:1.1.1.3
	RELENG_6_0:1.1.1.3.0.12
	RELENG_6_0_BP:1.1.1.3
	RELENG_6:1.1.1.3.0.10
	RELENG_6_BP:1.1.1.3
	RELENG_5_4_0_RELEASE:1.1.1.3
	RELENG_5_4:1.1.1.3.0.8
	RELENG_5_4_BP:1.1.1.3
	RELENG_4_11_0_RELEASE:1.1.1.2
	RELENG_4_11:1.1.1.2.0.24
	RELENG_4_11_BP:1.1.1.2
	RELENG_5_3_0_RELEASE:1.1.1.3
	v5_0:1.1.1.3
	RELENG_5_3:1.1.1.3.0.6
	RELENG_5_3_BP:1.1.1.3
	RELENG_5:1.1.1.3.0.4
	RELENG_5_BP:1.1.1.3
	RELENG_4_10_0_RELEASE:1.1.1.2
	RELENG_4_10:1.1.1.2.0.22
	RELENG_4_10_BP:1.1.1.2
	RELENG_5_2_1_RELEASE:1.1.1.3
	RELENG_5_2_0_RELEASE:1.1.1.3
	RELENG_5_2:1.1.1.3.0.2
	RELENG_5_2_BP:1.1.1.3
	RELENG_4_9_0_RELEASE:1.1.1.2
	RELENG_4_9:1.1.1.2.0.20
	RELENG_4_9_BP:1.1.1.2
	v4_3:1.1.1.3
	RELENG_5_1_0_RELEASE:1.1.1.2
	RELENG_5_1:1.1.1.2.0.18
	RELENG_5_1_BP:1.1.1.2
	RELENG_4_8_0_RELEASE:1.1.1.2
	RELENG_4_8:1.1.1.2.0.16
	RELENG_4_8_BP:1.1.1.2
	RELENG_5_0_0_RELEASE:1.1.1.2
	RELENG_5_0:1.1.1.2.0.14
	RELENG_5_0_BP:1.1.1.2
	RELENG_4_7_0_RELEASE:1.1.1.2
	RELENG_4_7:1.1.1.2.0.12
	RELENG_4_7_BP:1.1.1.2
	RELENG_4_6_2_RELEASE:1.1.1.2
	RELENG_4_6_1_RELEASE:1.1.1.2
	RELENG_4_6_0_RELEASE:1.1.1.2
	RELENG_4_6:1.1.1.2.0.10
	RELENG_4_6_BP:1.1.1.2
	RELENG_4_5_0_RELEASE:1.1.1.2
	RELENG_4_5:1.1.1.2.0.8
	RELENG_4_5_BP:1.1.1.2
	RELENG_4_4_0_RELEASE:1.1.1.2
	RELENG_4_4:1.1.1.2.0.6
	RELENG_4_4_BP:1.1.1.2
	RELENG_4_3_0_RELEASE:1.1.1.2
	RELENG_4_3:1.1.1.2.0.4
	RELENG_4_3_BP:1.1.1.2
	v4_2:1.1.1.2
	RELENG_4_2_0_RELEASE:1.1.1.2
	RELENG_4_1_1_RELEASE:1.1.1.2
	PRE_SMPNG:1.1.1.2
	RELENG_4_1_0_RELEASE:1.1.1.2
	RELENG_3_5_0_RELEASE:1.1.1.1.2.1
	v4_1:1.1.1.2
	RELENG_4_0_0_RELEASE:1.1.1.2
	RELENG_4:1.1.1.2.0.2
	RELENG_4_BP:1.1.1.2
	RELENG_3_4_0_RELEASE:1.1.1.1.2.1
	RELENG_3_3_0_RELEASE:1.1.1.1.2.1
	RELENG_3_2_PAO:1.1.1.1.0.4
	RELENG_3_2_PAO_BP:1.1.1.1
	v4_0:1.1.1.2
	RELENG_3_2_0_RELEASE:1.1.1.1
	RELENG_3_1_0_RELEASE:1.1.1.1
	RELENG_3:1.1.1.1.0.2
	RELENG_3_BP:1.1.1.1
	RELENG_3_0_0_RELEASE:1.1.1.1
	v2_2:1.1.1.1
	bash-2_01_1:1.1.1.1
	v2_1:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.1
date	97.06.07.12.17.44;	author ache;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	97.06.07.12.17.44;	author ache;	state Exp;
branches
	1.1.1.1.2.1;
next	1.1.1.2;

1.1.1.2
date	99.05.28.01.59.23;	author ache;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2003.08.31.17.55.46;	author ache;	state Exp;
branches
	1.1.1.3.52.1;
next	;

1.1.1.1.2.1
date	99.08.18.19.15.42;	author obrien;	state Exp;
branches;
next	;

1.1.1.3.52.1
date	2003.08.31.17.55.46;	author svnexp;	state dead;
branches;
next	1.1.1.3.52.2;

1.1.1.3.52.2
date	2013.03.28.13.01.31;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@#! /bin/bash -
#
# mkdist - make a distribution directory from a master manifest file
#
# usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version
#
# SRCDIR defaults to src
# MANIFEST defaults to $SRCDIR/MANIFEST
#

SRCDIR=src
ROOTNAME=bash

usage()
{
	echo usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version 1>&2
	exit 2
}

vmsg()
{
	if [ -n "$verbose" ]; then
		echo mkdist: "$@@"
	fi
}

while getopts m:s:r:v name
do
	case $name in
	m)	MANIFEST=$OPTARG ;;
	s)	SRCDIR=$OPTARG ;;
	r)	ROOTNAME=$OPTARG ;;
	v)	verbose=yes ;;
	?)	usage ;;
	esac
done

: ${MANIFEST:=$SRCDIR/MANIFEST}

vmsg using $MANIFEST

shift $(( $OPTIND - 1 ))

if [ $# -lt 1 ]; then
	usage
fi

version=$1
newdir=${ROOTNAME}-$version

vmsg creating distribution for version $version in $newdir

if [ ! -d $newdir ]; then
	mkdir $newdir || { echo $0: cannot make directory $newdir 1>&2 ; exit 1; }
fi

dirmode=755
filmode=644

while read fname type mode
do
	[ -z "$fname" ] && continue

	case "$fname" in
	\#*)	continue ;;
	esac

	case "$type" in
	d)	mkdir $newdir/$fname ;;
	f)	cp -p $SRCDIR/$fname $newdir/$fname ;;
	*)	echo "unknown file type $type" 1>&2 ;;
	esac

	if [ -n "$mode" ]; then
		chmod $mode $newdir/$fname
	fi

done < $MANIFEST

# cut off the `-alpha' in something like `2.0-alpha', leaving just the
# numeric version
#version=${version%%-*}

#case "$version" in
#*.*.*)	vers=${version%.*} ;;
#*.*)	vers=${version} ;;
#esac

#echo $vers > $newdir/.distribution

#case "$version" in
#*.*.*)	plevel=${version##*.} ;;
#*)	plevel=0 ;;
#esac
#[ -z "$plevel" ] && plevel=0
#echo ${plevel} > $newdir/.patchlevel

vmsg $newdir created

exit 0
@


1.1.1.1
log
@Virgin import of readline-2.1, unneded docs deleted
@
text
@@


1.1.1.1.2.1
log
@MFC: upgrade to readline-4.0.
@
text
@d51 1
a51 1
vmsg creating distribution for $ROOTNAME version $version in $newdir
@


1.1.1.2
log
@readline v4.0
@
text
@d51 1
a51 1
vmsg creating distribution for $ROOTNAME version $version in $newdir
@


1.1.1.3
log
@Virgin import of GNU Readline 4.3
@
text
@a9 18
# Chet Ramey
# chet@@po.cwru.edu

# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
a70 2
	s)	ln -s $mode $newdir/$fname ; mode= ;;		# symlink
	l)	ln $mode $newdir/$fname ; mode= ;;		# hard link
@


1.1.1.3.52.1
log
@file mkdist was added on branch RELENG_8_4 on 2013-03-28 13:01:31 +0000
@
text
@d1 120
@


1.1.1.3.52.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 120
#! /bin/bash -
#
# mkdist - make a distribution directory from a master manifest file
#
# usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version
#
# SRCDIR defaults to src
# MANIFEST defaults to $SRCDIR/MANIFEST
#
# Chet Ramey
# chet@@po.cwru.edu

# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.

SRCDIR=src
ROOTNAME=bash

usage()
{
	echo usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version 1>&2
	exit 2
}

vmsg()
{
	if [ -n "$verbose" ]; then
		echo mkdist: "$@@"
	fi
}

while getopts m:s:r:v name
do
	case $name in
	m)	MANIFEST=$OPTARG ;;
	s)	SRCDIR=$OPTARG ;;
	r)	ROOTNAME=$OPTARG ;;
	v)	verbose=yes ;;
	?)	usage ;;
	esac
done

: ${MANIFEST:=$SRCDIR/MANIFEST}

vmsg using $MANIFEST

shift $(( $OPTIND - 1 ))

if [ $# -lt 1 ]; then
	usage
fi

version=$1
newdir=${ROOTNAME}-$version

vmsg creating distribution for $ROOTNAME version $version in $newdir

if [ ! -d $newdir ]; then
	mkdir $newdir || { echo $0: cannot make directory $newdir 1>&2 ; exit 1; }
fi

dirmode=755
filmode=644

while read fname type mode
do
	[ -z "$fname" ] && continue

	case "$fname" in
	\#*)	continue ;;
	esac

	case "$type" in
	d)	mkdir $newdir/$fname ;;
	f)	cp -p $SRCDIR/$fname $newdir/$fname ;;
	s)	ln -s $mode $newdir/$fname ; mode= ;;		# symlink
	l)	ln $mode $newdir/$fname ; mode= ;;		# hard link
	*)	echo "unknown file type $type" 1>&2 ;;
	esac

	if [ -n "$mode" ]; then
		chmod $mode $newdir/$fname
	fi

done < $MANIFEST

# cut off the `-alpha' in something like `2.0-alpha', leaving just the
# numeric version
#version=${version%%-*}

#case "$version" in
#*.*.*)	vers=${version%.*} ;;
#*.*)	vers=${version} ;;
#esac

#echo $vers > $newdir/.distribution

#case "$version" in
#*.*.*)	plevel=${version##*.} ;;
#*)	plevel=0 ;;
#esac
#[ -z "$plevel" ] && plevel=0
#echo ${plevel} > $newdir/.patchlevel

vmsg $newdir created

exit 0
@


