#!/usr/bin/env ruby require 'gli' require 'itools' include GLI::App program_desc 'a collection of tools for ios developer' version Itools::VERSION desc "Analyze the memory footprint of each part or component in Xcode project" arg 'xxx.txt' command :parse do |c| c.action do |global_options, options, args| Itools::LinkMap.parser(args.first) end on_error do |err| if debugging? $stderr.puts err.message $stderr.puts err.backtrace.join("\n") else next if GLI::CustomExit === err $stderr.puts err.message end end def debugging? defined? Bundler end exit run(ARGV)