Madproject

Always know where your towel is.

Installing a Magento extension on a Mac: Merging files and folders

In order to install a Magento extension, the first step is usually to add the required files and folders to your current Magento installation. This can be a real pain on a Mac since its merge utility is rudimentary at best.

This is where rsync (which is available from the command line) comes in handy.

Common options
-a archive mode
-r recursive
-v verbose

Option 1
Merge all files and folders from source to destination (will overwrite files, not folders, in destination if source file exist with the same name under the same path)

rsync -arv SOURCE_DIR DEST_DIR

Option 2
Merge all files and folders from source to destination with the following rules:

  • Do not overwrite files which already exist
  • Skip destination files that are newer than the source
rsync -arvu SOURCE_DIR DEST_DIR --ignore-existing

Leave a Reply

Your email address will not be published. Required fields are marked *