From d9594ba12256611d2974cb3c754ccfe1f9a5d156 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 12 Sep 2016 05:29:13 +0200 Subject: [PATCH] Adobe Creative Suite 6 Production Premium: Use system language. (#2569) --- ...-de.rb => adobe-cs6-production-premium.rb} | 26 +++++++++++---- Casks/adobe-production-premium-cs6-es.rb | 33 ------------------- Casks/adobe-production-premium-cs6-fr.rb | 33 ------------------- Casks/adobe-production-premium-cs6-it.rb | 33 ------------------- Casks/adobe-production-premium-cs6-ja.rb | 33 ------------------- Casks/adobe-production-premium-cs6.rb | 33 ------------------- 6 files changed, 20 insertions(+), 171 deletions(-) rename Casks/{adobe-production-premium-cs6-de.rb => adobe-cs6-production-premium.rb} (65%) delete mode 100644 Casks/adobe-production-premium-cs6-es.rb delete mode 100644 Casks/adobe-production-premium-cs6-fr.rb delete mode 100644 Casks/adobe-production-premium-cs6-it.rb delete mode 100644 Casks/adobe-production-premium-cs6-ja.rb delete mode 100644 Casks/adobe-production-premium-cs6.rb diff --git a/Casks/adobe-production-premium-cs6-de.rb b/Casks/adobe-cs6-production-premium.rb similarity index 65% rename from Casks/adobe-production-premium-cs6-de.rb rename to Casks/adobe-cs6-production-premium.rb index 84bdd8893..ed254f21f 100644 --- a/Casks/adobe-production-premium-cs6-de.rb +++ b/Casks/adobe-cs6-production-premium.rb @@ -1,6 +1,6 @@ -cask 'adobe-production-premium-cs6-de' do - version :latest - sha256 :no_check +cask 'adobe-cs6-production-premium' do + version 'CS6' + sha256 '81560be59a1c747290d1d11b95a3391ebb86788636d40cd670a607a90cd70da2' # This Cask only works for Adobe dmgs containing the deploy folder, # i.e. the Adobe Collections, not the single Product Installers! @@ -8,7 +8,7 @@ cask 'adobe-production-premium-cs6-de' do # For correct download URL see links provided at # https://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html - url 'http://trials2.adobe.com/AdobeProducts/STVD/CS6/osx10/ProductionPremium_CS6_LS7.dmg', + url "http://trials2.adobe.com/AdobeProducts/STVD/#{version}/osx10/ProductionPremium_#{version}_LS7.dmg", user_agent: :fake, cookies: { 'MM_TRIALS' => '1234' } name 'Adobe CS6 Production Premium' # name must exactly match directory in dmg! @@ -20,13 +20,27 @@ cask 'adobe-production-premium-cs6-de' do # and https://github.com/caskroom/homebrew-versions/pull/296 preflight do + language = case MacOS.language + when %r{^de} then 'de_DE' + when 'en-GB' then 'en_GB' + when %r{^es} then 'es_ES' + when %r{^fr} then 'fr_FR' + when %r{^it} then 'it_IT' + when %r{^ja} then 'ja_JP' + when %r{^nl} then 'nl_NL' + else + 'en_US' + end + system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/install-de_DE.xml" + system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/install-#{language}.xml" + + FileUtils.cp "#{staged_path}/Adobe CS6 Production Premium/deploy/uninstall-#{language}.xml", "#{staged_path}/uninstall.xml" end uninstall_preflight do system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/uninstall-de_DE.xml" + system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/uninstall.xml" end caveats 'Installation or Uninstallation may fail with Exit Code 19 (Conflicting Processes running) if Browsers, Safari Notification Service or SIMBL Services (e.g. Flashlight) are running or Adobe Creative Cloud or any other Adobe Products are already installed. See Logs in /Library/Logs/Adobe/Installers if Installation or Uninstallation fails, to identifify the conflicting processes.' diff --git a/Casks/adobe-production-premium-cs6-es.rb b/Casks/adobe-production-premium-cs6-es.rb deleted file mode 100644 index 7b5b1b2d3..000000000 --- a/Casks/adobe-production-premium-cs6-es.rb +++ /dev/null @@ -1,33 +0,0 @@ -cask 'adobe-production-premium-cs6-es' do - version :latest - sha256 :no_check - - # This Cask only works for Adobe dmgs containing the deploy folder, - # i.e. the Adobe Collections, not the single Product Installers! - - # For correct download URL see links provided at - # https://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html - - url 'http://trials2.adobe.com/AdobeProducts/STVD/CS6/osx10/ProductionPremium_CS6_LS7.dmg', - user_agent: :fake, - cookies: { 'MM_TRIALS' => '1234' } - name 'Adobe CS6 Production Premium' # name must exactly match directory in dmg! - homepage 'https://www.adobe.com/mena_en/products/creativesuite.html' - license :commercial - - # staged_path not available in Installer/Uninstall Stanza, workaround by nesting with preflight/postflight - # see https://github.com/caskroom/homebrew-cask/pull/8887 - # and https://github.com/caskroom/homebrew-versions/pull/296 - - preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/install-es_ES.xml" - end - - uninstall_preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/uninstall-es_ES.xml" - end - - caveats 'Installation or Uninstallation may fail with Exit Code 19 (Conflicting Processes running) if Browsers, Safari Notification Service or SIMBL Services (e.g. Flashlight) are running or Adobe Creative Cloud or any other Adobe Products are already installed. See Logs in /Library/Logs/Adobe/Installers if Installation or Uninstallation fails, to identifify the conflicting processes.' -end diff --git a/Casks/adobe-production-premium-cs6-fr.rb b/Casks/adobe-production-premium-cs6-fr.rb deleted file mode 100644 index 5b1185b7c..000000000 --- a/Casks/adobe-production-premium-cs6-fr.rb +++ /dev/null @@ -1,33 +0,0 @@ -cask 'adobe-production-premium-cs6-fr' do - version :latest - sha256 :no_check - - # This Cask only works for Adobe dmgs containing the deploy folder, - # i.e. the Adobe Collections, not the single Product Installers! - - # For correct download URL see links provided at - # https://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html - - url 'http://trials2.adobe.com/AdobeProducts/STVD/CS6/osx10/ProductionPremium_CS6_LS7.dmg', - user_agent: :fake, - cookies: { 'MM_TRIALS' => '1234' } - name 'Adobe CS6 Production Premium' # name must exactly match directory in dmg! - homepage 'https://www.adobe.com/mena_en/products/creativesuite.html' - license :commercial - - # staged_path not available in Installer/Uninstall Stanza, workaround by nesting with preflight/postflight - # see https://github.com/caskroom/homebrew-cask/pull/8887 - # and https://github.com/caskroom/homebrew-versions/pull/296 - - preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/install-fr_FR.xml" - end - - uninstall_preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/uninstall-fr_FR.xml" - end - - caveats 'Installation or Uninstallation may fail with Exit Code 19 (Conflicting Processes running) if Browsers, Safari Notification Service or SIMBL Services (e.g. Flashlight) are running or Adobe Creative Cloud or any other Adobe Products are already installed. See Logs in /Library/Logs/Adobe/Installers if Installation or Uninstallation fails, to identifify the conflicting processes.' -end diff --git a/Casks/adobe-production-premium-cs6-it.rb b/Casks/adobe-production-premium-cs6-it.rb deleted file mode 100644 index ecd826130..000000000 --- a/Casks/adobe-production-premium-cs6-it.rb +++ /dev/null @@ -1,33 +0,0 @@ -cask 'adobe-production-premium-cs6-it' do - version :latest - sha256 :no_check - - # This Cask only works for Adobe dmgs containing the deploy folder, - # i.e. the Adobe Collections, not the single Product Installers! - - # For correct download URL see links provided at - # https://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html - - url 'http://trials2.adobe.com/AdobeProducts/STVD/CS6/osx10/ProductionPremium_CS6_LS7.dmg', - user_agent: :fake, - cookies: { 'MM_TRIALS' => '1234' } - name 'Adobe CS6 Production Premium' # name must exactly match directory in dmg! - homepage 'https://www.adobe.com/mena_en/products/creativesuite.html' - license :commercial - - # staged_path not available in Installer/Uninstall Stanza, workaround by nesting with preflight/postflight - # see https://github.com/caskroom/homebrew-cask/pull/8887 - # and https://github.com/caskroom/homebrew-versions/pull/296 - - preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/install-it_IT.xml" - end - - uninstall_preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/uninstall-it_IT.xml" - end - - caveats 'Installation or Uninstallation may fail with Exit Code 19 (Conflicting Processes running) if Browsers, Safari Notification Service or SIMBL Services (e.g. Flashlight) are running or Adobe Creative Cloud or any other Adobe Products are already installed. See Logs in /Library/Logs/Adobe/Installers if Installation or Uninstallation fails, to identifify the conflicting processes.' -end diff --git a/Casks/adobe-production-premium-cs6-ja.rb b/Casks/adobe-production-premium-cs6-ja.rb deleted file mode 100644 index 642f3ea78..000000000 --- a/Casks/adobe-production-premium-cs6-ja.rb +++ /dev/null @@ -1,33 +0,0 @@ -cask 'adobe-production-premium-cs6-ja' do - version :latest - sha256 :no_check - - # This Cask only works for Adobe dmgs containing the deploy folder, - # i.e. the Adobe Collections, not the single Product Installers! - - # For correct download URL see links provided at - # https://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html - - url 'http://trials2.adobe.com/AdobeProducts/STVD/CS6/osx10/ProductionPremium_CS6_LS7.dmg', - user_agent: :fake, - cookies: { 'MM_TRIALS' => '1234' } - name 'Adobe CS6 Production Premium' # name must exactly match directory in dmg! - homepage 'https://www.adobe.com/mena_en/products/creativesuite.html' - license :commercial - - # staged_path not available in Installer/Uninstall Stanza, workaround by nesting with preflight/postflight - # see https://github.com/caskroom/homebrew-cask/pull/8887 - # and https://github.com/caskroom/homebrew-versions/pull/296 - - preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/install-ja_JP.xml" - end - - uninstall_preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/uninstall-ja_JP.xml" - end - - caveats 'Installation or Uninstallation may fail with Exit Code 19 (Conflicting Processes running) if Browsers, Safari Notification Service or SIMBL Services (e.g. Flashlight) are running or Adobe Creative Cloud or any other Adobe Products are already installed. See Logs in /Library/Logs/Adobe/Installers if Installation or Uninstallation fails, to identifify the conflicting processes.' -end diff --git a/Casks/adobe-production-premium-cs6.rb b/Casks/adobe-production-premium-cs6.rb deleted file mode 100644 index 74ed78e06..000000000 --- a/Casks/adobe-production-premium-cs6.rb +++ /dev/null @@ -1,33 +0,0 @@ -cask 'adobe-production-premium-cs6' do - version :latest - sha256 :no_check - - # This Cask only works for Adobe dmgs containing the deploy folder, - # i.e. the Adobe Collections, not the single Product Installers! - - # For correct download URL see links provided at - # https://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html - - url 'http://trials2.adobe.com/AdobeProducts/STVD/CS6/osx10/ProductionPremium_CS6_LS7.dmg', - user_agent: :fake, - cookies: { 'MM_TRIALS' => '1234' } - name 'Adobe CS6 Production Premium' # name must exactly match directory in dmg! - homepage 'https://www.adobe.com/mena_en/products/creativesuite.html' - license :commercial - - # staged_path not available in Installer/Uninstall Stanza, workaround by nesting with preflight/postflight - # see https://github.com/caskroom/homebrew-cask/pull/8887 - # and https://github.com/caskroom/homebrew-versions/pull/296 - - preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/install-en_US.xml" - end - - uninstall_preflight do - system '/usr/bin/killall', '-kill', 'SafariNotificationAgent' - system '/usr/bin/sudo', '-E', '--', "#{staged_path}/Adobe CS6 Production Premium/Install.app/Contents/MacOS/Install", '--mode=silent', "--deploymentFile=#{staged_path}/Adobe CS6 Production Premium/deploy/uninstall-en_US.xml" - end - - caveats 'Installation or Uninstallation may fail with Exit Code 19 (Conflicting Processes running) if Browsers, Safari Notification Service or SIMBL Services (e.g. Flashlight) are running or Adobe Creative Cloud or any other Adobe Products are already installed. See Logs in /Library/Logs/Adobe/Installers if Installation or Uninstallation fails, to identifify the conflicting processes.' -end