aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/tar-copy.sh
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-01-20 07:32:02 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-01-20 07:32:02 +0000
commit4a1a95108dd76c4259fe6c37c4471f7969b17983 (patch)
tree1c6c3b549401156e1dbd96b9a6b18521f63ffb58 /contrib/ncurses/tar-copy.sh
parent555c9cae3cf9146482732c28c06a73314b618149 (diff)
downloadsrc-4a1a95108dd76c4259fe6c37c4471f7969b17983.tar.gz
src-4a1a95108dd76c4259fe6c37c4471f7969b17983.zip
Import ncurses 5.6-20061217 onto the vender branch
Approved by: delphij
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=166124
Diffstat (limited to 'contrib/ncurses/tar-copy.sh')
-rwxr-xr-xcontrib/ncurses/tar-copy.sh29
1 files changed, 18 insertions, 11 deletions
diff --git a/contrib/ncurses/tar-copy.sh b/contrib/ncurses/tar-copy.sh
index 4e45bc34ed33..3df1bc11169e 100755
--- a/contrib/ncurses/tar-copy.sh
+++ b/contrib/ncurses/tar-copy.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-# $Id: tar-copy.sh,v 1.3 1998/02/11 12:14:03 tom Exp $
+# $Id: tar-copy.sh,v 1.5 2003/10/25 14:40:07 tom Exp $
##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc. #
+# Copyright (c) 1998,2003 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,7 +28,7 @@
# authorization. #
##############################################################################
#
-# Author: Thomas E. Dickey <dickey@clark.net> 1997,1998
+# Author: Thomas E. Dickey
#
# Copy a collection of files using 'tar', so that their dates and links are
# preserved
@@ -55,16 +55,23 @@ fi
WD=`pwd`
TMP=$WD/copy$$
-trap "rm -f $TMP" 0 1 2 5 15
cd $2
-if ( tar cf $TMP $1 )
+TEST=`ls -d $1 2>/dev/null`
+if test -z "$TEST"
then
- cd $3
- LIST=`tar tf $TMP 2>&1`
- $DOIT rm -rf $LIST 2>/dev/null
- $DOIT tar xvf $TMP
+ echo "... no match for \"$1\" in $2"
else
- echo "Cannot create tar of $1 files"
- exit 1
+ echo "... installing files matching \"$1\" in $2"
+ trap "rm -f $TMP" 0 1 2 5 15
+ if ( tar cf $TMP $1 )
+ then
+ cd $3
+ LIST=`tar tf $TMP 2>&1`
+ $DOIT rm -rf $LIST 2>/dev/null
+ $DOIT tar xvf $TMP
+ else
+ echo "Cannot create tar of $1 files"
+ exit 1
+ fi
fi