diff --git a/Support/assets/upload.php b/Support/assets/upload.php
old mode 100644
new mode 100755
index 9069606..679f875
--- a/Support/assets/upload.php
+++ b/Support/assets/upload.php
@@ -17,12 +17,18 @@
$response = send_asset($api_key, $password, $store ,$xmlFile);
if('200' == response_code($response)) {
- echo "Uploaded {$assetKey} to {$config->current}.";
+
+ /* Add by Dale Tournemille 2013. This invokes terminal-notifier (by Eloy DurĂ¡n) and displays the success upload message using OS X Notification Center. */
+ echo "Uploaded {$assetKey} to {$config->current}.";
+ echo exec("/usr/local/bin/terminal-notifier -title 'File Uploaded' -message 'The file {$assetKey} has been uploaded to your {$config->current} theme on Shopify.' -sender com.macromates.TextMate.preview");
+
+
} else {
// Not ideal, but it works. Problem (though not much of one ):
// response on a fail will return the full curl page: ie, shopify 404 full html, + error code at the bottom
// Will robustify if it becomes an issue.
echo "*Error: Could not upload {$assetKey} to {$config->current}." ;
+ echo exec("/usr/local/bin/terminal-notifier -title 'Upload Error' -message 'Houston, we have a problem. The file {$assetKey} was NOT uploaded to {$config->current}.' -sender com.macromates.TextMate.preview");
output_error($response);
}
//And clean up
diff --git a/Support/assets/upload_multi.php b/Support/assets/upload_multi.php
old mode 100644
new mode 100755
index 7b51f2d..e7816d2
--- a/Support/assets/upload_multi.php
+++ b/Support/assets/upload_multi.php
@@ -33,11 +33,13 @@
if('200' == response_code($response)) {
echo "Uploaded: {$assetKey}
";
+ echo exec("/usr/local/bin/terminal-notifier -title 'File Uploaded' -message 'The file {$assetKey} has been uploaded to Shopify.' -sender com.macromates.TextMate.preview");
} else {
// Not ideal, but it works. Problem (though not much of one ):
// response on a fail will return the full curl page: ie, shopify 404 full html, + error code at the bottom
// Will robustify if it becomes an issue.
echo "*Error: Could not upload {$assetKey} to {$config->current}." ;
+ echo exec("/usr/local/bin/terminal-notifier -title 'Upload Error' -message 'Houston, we have a problem. The file {$assetKey} was NOT uploaded to {$config->current}.' -sender com.macromates.TextMate.preview");
output_error($response, array('line_break' => '
'));
}
//And clean up