Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def self.pkg(platform, opt)
# short time solution <start>
extension = case platform
when "win32" then
"exe"
when "linux" then
"run"
when "osx" then
"dmg"
else
raise "omg, unknown platform!"
end
# short time solution <end>
url =
case opt
when I_YES; "http://hacketyhack.net/pkg/#{platform}/shoes"
when I_NOV; "http://hacketyhack.net/pkg/#{platform}/shoes-novideo"
end
if url
#url = "http://hacketyhack.net" + open(url).read.strip
save = File.join(LIB_DIR, "shoes2.#{extension}")
if File.exists? save; open(save)
else open(url)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.