The following example is for a language pack that will have the filename, admin_fr-CA.zip.
This is to run this in a single line in a terminal on OSX. It will create the necessary packages from the files in admin and site folders. It will also name and cleanup after itself before creating the finale file fr-ca_joomla_lang_3.3.1v1.zip.
zip -r admin_fr-CA.zip admin_fr-CA -x “*/\.DS_Store” ;
zip -r site_fr-CA.zip site_fr-CA -x “*/\.DS_Store” ;
rm -fr admin_fr-CA ; rm -fr site_fr-CA ; cd .. ;
zip -r fr-CA_joomla_lang_full_3.3.1v1.zip fr-CA_joomla_lang_full_3.3.1v1 -x “*/\.DS_Store”
Properly packing a plugin.
Create a zip without the .DS_Store files or .git files
zip -r plg_mycomponent_cdn_copy.zip plg_mycomponent_cdn_copy -x *.DS_Store -x *.git*