Running ImageOptim-CLI on subfolders

Could please someone help me with the following workflow:
I have my photos in a Photos folder. That folder has a subfolder with the year the photo was taken (e.g 2013). That subfolder has subfolders with the name of the events where the photos were taken. Those subfolders also contain my jpegs.
Since I use JPEGmini, I optimize all jpegs with it. Before I convert my photos from RAW to jpeg, I create a subfolder with the even's name. Then I save the converted photos (jpegs) into that subfolder.
I want the following: after the jpegs are put into the event subfolder I want to run ImageOptim-CLI which invokes JPEGmini. The syntax for ImageOptim-CLI is: imageOptim-CLI -j -d folder. How can I tell imageOptim that it executes itself on the current event subfolder? I think -d $PWD is not enough.
Thanks.
I have my photos in a Photos folder. That folder has a subfolder with the year the photo was taken (e.g 2013). That subfolder has subfolders with the name of the events where the photos were taken. Those subfolders also contain my jpegs.
Since I use JPEGmini, I optimize all jpegs with it. Before I convert my photos from RAW to jpeg, I create a subfolder with the even's name. Then I save the converted photos (jpegs) into that subfolder.
I want the following: after the jpegs are put into the event subfolder I want to run ImageOptim-CLI which invokes JPEGmini. The syntax for ImageOptim-CLI is: imageOptim-CLI -j -d folder. How can I tell imageOptim that it executes itself on the current event subfolder? I think -d $PWD is not enough.
Thanks.