source: projects/vutils/trunk/cpdir @ 1120

Revision 1120, 376 bytes checked in by daisuke, 12 years ago (diff)

import vutils-2.2.4 from internal cvs repository

Line 
1#!/bin/bash
2# cpdir by Jun Nishii <jun@vinelinux.org>
3#            Time-stamp: <2000-08-19 15:33:49 vine>
4
5showUsage(){
6    echo "Usage: ${0##/*/} target-dir destination-dir"
7}
8
9cpDir(){ # <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
16case $# in
172) ;;
18*) showUsage ; exit
19esac
20
21cpDir $1 $2
22
23
Note: See TracBrowser for help on using the repository browser.