From da03c8e14acb480525647922e42a23effb4c2c72 Mon Sep 17 00:00:00 2001 From: commitay Date: Mon, 8 May 2017 09:17:36 +1000 Subject: [PATCH] Update kicad-nightly to match kicad (#3787) --- Casks/kicad-nightly.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Casks/kicad-nightly.rb b/Casks/kicad-nightly.rb index 7af84eaf0..3207c5d91 100644 --- a/Casks/kicad-nightly.rb +++ b/Casks/kicad-nightly.rb @@ -7,10 +7,14 @@ cask 'kicad-nightly' do homepage 'http://kicad-pcb.org/' suite 'Kicad-apps', target: 'Kicad' - artifact 'kicad', target: "#{ENV['HOME']}/Library/Application Support/kicad" + artifact 'kicad', target: '/Library/Application Support/kicad' preflight do - system_command '/bin/mkdir', args: ['--', "#{staged_path}/Kicad-apps"] - system_command '/bin/mv', args: ['--', *Dir["#{staged_path}/Kicad/*.app"], "#{staged_path}/Kicad-apps/"] + FileUtils.cd staged_path do + FileUtils.mkdir 'Kicad-apps' + FileUtils.mv Dir.glob('Kicad/*.app'), 'Kicad-apps' + end end + + zap delete: '~/Library/Preferences/kicad' end