summaryrefslogtreecommitdiffstats
path: root/upd-real-tree
blob: 33204615ef683e75133f5925d82295d6caf10456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

if [ -z "$1" -o ! -d "$1" ]; then
	echo "usage: $0 <dir>"
	exit 1
fi

DEST=$1/RedHat/instimage
SRC=../../../RedHat/instimage
DEST1=$1/misc
SRC1=../../../misc

for n in $SRC $DEST $SRC1 $DEST1; do
	if [ ! -d $n ]; then
		echo "$n does not exist"
		exit 1
	fi
done

rm -rf $DEST $DEST1
mkdir -p $DEST $DEST1

(cd $SRC; tar cSpf - . | (cd $DEST; tar xvSpf -))

(cd $SRC1; tar cSpf - . | (cd $DEST1; tar xvSpf -))