Sha256: 516b8bc89242974797a3b409fa01705af8a090dd468359f6823041146284c02b

Contents?: true

Size: 1.15 KB

Versions: 2

Compression:

Stored size: 1.15 KB

Contents

#!/usr/bin/env ruby

require 'clamp'
require 'synx'

Clamp do

  parameter "xcodeproj", "Path to the xcodeproj", :attribute_name => :xcodeproj_path
  option ["--prune", "-p"], :flag, "remove source files and image resources that are not referenced by the the xcode project"
  option "--no-color", :flag, "removes all color from the output"
  option "--no-default-exclusions", :flag, "doesn't use the default exclusions of /Libraries, /Frameworks, and /Products"
  option "--no-sort-by-name", :flag, "disable sorting groups by name"
  option ["--quiet", "-q"], :flag, "silence all output"
  option ["--exclusion", "-e"], "EXCLUSION", "ignore an Xcode group while syncing", :multivalued => true
  option ["--version", "-v"], :flag, "shows synx version" do
    puts "Synx #{Synx::VERSION}"
    exit(0)
  end

  def execute
    if Process.uid == 0
      puts "You cannot run Synx as root.".red
    else
      project = Synx::Project.open(xcodeproj_path)
      project.sync(:prune => prune?, :quiet => quiet?, :no_color => no_color?, :no_default_exclusions => no_default_exclusions?, :no_sort_by_name => no_sort_by_name?, :group_exclusions => exclusion_list)
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
synx-0.2.1 bin/synx
synx-0.2.0 bin/synx