diff --git a/lib/cocoapods-binary/Integration.rb b/lib/cocoapods-binary/Integration.rb index dab6aa7..1f61dd9 100644 --- a/lib/cocoapods-binary/Integration.rb +++ b/lib/cocoapods-binary/Integration.rb @@ -269,11 +269,11 @@ class EmbedFrameworksScript # If the path isn't an absolute path, we add a realtive prefix. old_read_link=`which readlink` readlink () { - path=`$old_read_link $1`; + path=`$old_read_link "$1"`; if [ $(echo "$path" | cut -c 1-1) = '/' ]; then echo $path; else - echo "`dirname $1`/$path"; + echo "`dirname "$1"`/$path"; fi } # --- @@ -286,4 +286,4 @@ class EmbedFrameworksScript end end end -end \ No newline at end of file +end diff --git a/lib/cocoapods-binary/rome/build_framework.rb b/lib/cocoapods-binary/rome/build_framework.rb index 10c8571..78edabe 100644 --- a/lib/cocoapods-binary/rome/build_framework.rb +++ b/lib/cocoapods-binary/rome/build_framework.rb @@ -1,5 +1,6 @@ require 'fourflusher' require 'xcpretty' +require 'shellwords' CONFIGURATION = "Release" PLATFORMS = { 'iphonesimulator' => 'iOS', @@ -50,7 +51,7 @@ def build_for_iosish_platform(sandbox, # the device_lib path is the final output file path # combine the binaries tmp_lipoed_binary_path = "#{build_dir}/#{target_name}" - lipo_log = `lipo -create -output #{tmp_lipoed_binary_path} #{device_binary} #{simulator_binary}` + lipo_log = `lipo -create -output #{tmp_lipoed_binary_path.shellescape} #{device_binary.shellescape} #{simulator_binary.shellescape}` puts lipo_log unless File.exist?(tmp_lipoed_binary_path) FileUtils.mv tmp_lipoed_binary_path, device_binary, :force => true @@ -91,7 +92,7 @@ def build_for_iosish_platform(sandbox, simulator_dsym = "#{simulator_framework_path}.dSYM" if File.exist? simulator_dsym tmp_lipoed_binary_path = "#{output_path}/#{module_name}.draft" - lipo_log = `lipo -create -output #{tmp_lipoed_binary_path} #{device_dsym}/Contents/Resources/DWARF/#{module_name} #{simulator_dsym}/Contents/Resources/DWARF/#{module_name}` + lipo_log = `lipo -create -output #{tmp_lipoed_binary_path.shellescape} #{device_dsym.shellescape}/Contents/Resources/DWARF/#{module_name.shellescape} #{simulator_dsym.shellescape}/Contents/Resources/DWARF/#{module_name.shellescape}` puts lipo_log unless File.exist?(tmp_lipoed_binary_path) FileUtils.mv tmp_lipoed_binary_path, "#{device_framework_path}.dSYM/Contents/Resources/DWARF/#{module_name}", :force => true end @@ -106,7 +107,7 @@ def build_for_iosish_platform(sandbox, end def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, other_options=[]) - args = %W(-project #{sandbox.project_path.realdirpath} -scheme #{target} -configuration #{CONFIGURATION} -sdk #{sdk} ) + args = %W(-project #{sandbox.project_path.realdirpath.shellescape} -scheme #{target} -configuration #{CONFIGURATION} -sdk #{sdk} ) platform = PLATFORMS[sdk] args += Fourflusher::SimControl.new.destination(:oldest, platform, deployment_target) unless platform.nil? args += other_options