mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 13:06:38 +00:00
20 lines
355 B
Ruby
20 lines
355 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'net/http'
|
|
|
|
module Common
|
|
private
|
|
|
|
def run_cmd(*args)
|
|
info "executing: #{args.join(' ')}"
|
|
system(*args) || err("Exit code: #{$CHILD_STATUS.exitstatus}")
|
|
end
|
|
|
|
def http_get(url)
|
|
response = Net::HTTP.get_response(URI.parse(url))
|
|
return unless response.code == '200'
|
|
|
|
response.body
|
|
end
|
|
end
|