1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 11:36:37 +02:00
Files
anope/bin/cp-recursive
T
svn svn@31f1291d-b8d6-0310-a050-a5561fc1590b 55bf4dbcab Initial Anope Import
git-svn-id: svn://svn.anope.org/anope/trunk@1 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1 5417fbe8-f217-4b02-8779-1006273d7864
2004-03-28 21:59:56 +00:00

22 lines
328 B
Bash
Executable File

#!/bin/sh
if [ $1 = "-t" ] ; then
shift
fi
if [ ! "$2" ] ; then
echo >&2 Usage: $0 '<sourcedir> <targetdir>'
exit 1
fi
if [ -d "$1" ] ; then
dir="$1"
else
dir="`echo $1 | sed 's#\(.*\)/.*#\1#'`"
fi
while [ "$2" ] ; do
shift
done
if [ ! -d $1 ] ; then
mkdir -p $1 || exit 1
fi
/bin/tar -Ccf $dir - . | /bin/tar -Cxf $1 -