how to tell tar to ignore resource files (._//)

the macosX version of tar, /usr/bin/tar, will ignore resource fork files if a particular environment variable is set. the name of the variable has changed between versions, but can be determined by peeking inside the binary with this command:

* strings /usr/bin/tar | grep DISABLE *

on my work box (10.5.8), the variable is COPYFILE_DISABLE.

in a shell script, this can be coded something like this:

case \`uname\` in
        Darwin) env \`strings /usr/bin/tar|grep DISABLE\`= tar zcf $TGZ dirname ;;
        //) tar zcf $TGZ dirname ;;