open(FP,"diff -ru --brief $SOURCE $TARGET 2>/dev/null |");
open(FP2, "|(cd $TARGET ; tar jcf $DESTINATION$SCRUBBED_TARGET.$SUFFIX -T -)");
while (
s/: /\//g;
#this is if the file that was in TARGET is different than SOURCE
if (/^Files .* and (.*) differ$/){
$tmp = $1;
$tmp =~ s/$TARGET/\./;
print FP2 $tmp,"\n";
}
#this is if the file no longer lives in SOURCE at all
if (/^Only in ($TARGET.*)\n/){
$tmp = $1;
$tmp =~ s/$TARGET/\./;
print FP2 $tmp,"\n";
}
}
No comments:
Post a Comment