# File lib/fpm/util.rb, line 238
  def ar_cmd
    return @@ar_cmd if defined? @@ar_cmd

    @@ar_cmd_deterministic = false

    # FIXME: don't assume current directory writeable
    FileUtils.touch(["fpm-dummy.tmp"])
    ["ar", "gar"].each do |ar|
      ["-qc", "-qcD"].each do |ar_create_opts|
        FileUtils.rm_f(["fpm-dummy.ar.tmp"])
        # Return this combination if it creates archives without uids or timestamps.
        # Exitstatus will be nonzero if the archive can't be created,
        # or its table of contents doesn't match the regular expression.
        # Be extra-careful about locale and timezone when matching output.
        system("#{ar} #{ar_create_opts} fpm-dummy.ar.tmp fpm-dummy.tmp 2>/dev/null && env TZ=UTC LANG=C LC_TIME=C #{ar} -tv fpm-dummy.ar.tmp | grep '0/0.*1970' > /dev/null 2>&1")
        if $?.exitstatus == 0
           @@ar_cmd = [ar, ar_create_opts]
           @@ar_cmd_deterministic = true
           return @@ar_cmd
        end
      end
    end
    # If no combination of ar and options omits timestamps, fall back to default.
    @@ar_cmd = ["ar", "-qc"]
    return @@ar_cmd
  ensure
    # Clean up
    FileUtils.rm_f(["fpm-dummy.ar.tmp", "fpm-dummy.tmp"])
  end