mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-22 13:27:58 +02:00
60 lines
1.4 KiB
Bash
Executable File
60 lines
1.4 KiB
Bash
Executable File
#! /bin/bash -
|
|
#
|
|
# mksnap -- make a snapshot copy of the bash source tree in a new directory
|
|
# named by the date
|
|
#
|
|
# Chet Ramey
|
|
# chet@po.cwru.edu
|
|
|
|
# Copyright (C) 1996-2002 by Chester Ramey
|
|
#
|
|
# 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
SRCDIR="src"
|
|
SRCARG="-s src"
|
|
ROOTNAME="-r bash"
|
|
|
|
usage()
|
|
{
|
|
echo usage: mksnap [-m manifest] [-s srcdir] [-r rootname] [-v] 1>&2
|
|
exit 2
|
|
}
|
|
|
|
vmsg()
|
|
{
|
|
if [ -n "$verbose" ]; then
|
|
echo mksnap: "$@"
|
|
fi
|
|
}
|
|
|
|
while getopts m:s:r:v name
|
|
do
|
|
case $name in
|
|
m) MANIFEST="-m $OPTARG" ;;
|
|
s) SRCDIR="$OPTARG" SRCARG="-s $OPTARG" ;;
|
|
r) ROOTNAME="-r $OPTARG" ;;
|
|
v) verbose=-v ;;
|
|
?) usage ;;
|
|
esac
|
|
done
|
|
|
|
VERSION=`date "+%Y%m%d"`
|
|
|
|
vmsg calling mkdist $verbose
|
|
|
|
/bin/bash $SRCDIR/support/mkdist $verbose $SRCARG $MANIFEST $ROOTNAME $VERSION
|
|
|
|
exit 0
|