infcall: refactor 'call_function_by_hand_dummy'
[deliverable/binutils-gdb.git] / readline / support / mkdist
index a1e4eb16fed2ce147de8a9bd216b0475ef665f23..282431d4ad319017c5ed9ecb694313b90868fcce 100755 (executable)
@@ -2,18 +2,36 @@
 #
 # mkdist - make a distribution directory from a master manifest file
 #
-# usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version
+# usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-t] [-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 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
 ROOTNAME=bash
 
 usage()
 {
-       echo usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version 1>&2
+       echo usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-t] [-v] version 1>&2
        exit 2
 }
 
@@ -24,12 +42,13 @@ vmsg()
        fi
 }
 
-while getopts m:s:r:v name
+while getopts m:s:r:tv name
 do
        case $name in
        m)      MANIFEST=$OPTARG ;;
        s)      SRCDIR=$OPTARG ;;
        r)      ROOTNAME=$OPTARG ;;
+       t)      maketar=yes ;;
        v)      verbose=yes ;;
        ?)      usage ;;
        esac
@@ -48,6 +67,8 @@ fi
 version=$1
 newdir=${ROOTNAME}-$version
 
+tarfile=${newdir}.tar
+
 vmsg creating distribution for $ROOTNAME version $version in $newdir
 
 if [ ! -d $newdir ]; then
@@ -68,6 +89,8 @@ do
        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
 
@@ -97,4 +120,10 @@ done < $MANIFEST
 
 vmsg $newdir created
 
+if [ -n "$maketar" ]; then
+       tar cf ${tarfile} $newdir
+       gzip $tarfile
+       vmsg ${tarfile}.gz created
+fi
+
 exit 0
This page took 0.025938 seconds and 4 git commands to generate.