6 desc: Copy files from one dir to another dir using tar
7 usage: do_copy_files $PRUNEPATH $ROOT_DIR $DEST_DIR
8 input vars: $1 list of dirs that must be skipped by tar
9 $2 the root dir of the files that will be copied
10 $3 the dir where the copied files will be placed
18 TMP_FILE
=/tmp
/prunelist
20 echo -en "\nCopying system files to $3 ..."
22 # Create a file that we can pass to tar as an "exclude list".
23 # There might be an easier way to achieve tar exclusions? Strip
26 echo .
${F} >> $TMP_FILE
31 tar -X $TMP_FILE -cf - . |
tar -C $3 -xf -
33 # Clear out the temporary file