Revision 1120,
376 bytes
checked in by daisuke, 14 years ago
(diff) |
import vutils-2.2.4 from internal cvs repository
|
Rev | Line | |
---|
[1120] | 1 | #!/bin/bash |
---|
| 2 | # cpdir by Jun Nishii <jun@vinelinux.org> |
---|
| 3 | # Time-stamp: <2000-08-19 15:33:49 vine> |
---|
| 4 | |
---|
| 5 | showUsage(){ |
---|
| 6 | echo "Usage: ${0##/*/} target-dir destination-dir" |
---|
| 7 | } |
---|
| 8 | |
---|
| 9 | cpDir(){ # <srcdir> <dstdir> |
---|
| 10 | src=`dirname $1` |
---|
| 11 | dir=`basename $1` |
---|
| 12 | dst=$2 |
---|
| 13 | (cd $src; tar cf - $dir) | (cd $dst && tar xfBp -) |
---|
| 14 | } |
---|
| 15 | |
---|
| 16 | case $# in |
---|
| 17 | 2) ;; |
---|
| 18 | *) showUsage ; exit |
---|
| 19 | esac |
---|
| 20 | |
---|
| 21 | cpDir $1 $2 |
---|
| 22 | |
---|
| 23 | |
---|
Note: See
TracBrowser
for help on using the repository browser.