Skip to content

Instantly share code, notes, and snippets.

@vsalbaba
Created August 25, 2009 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vsalbaba/175049 to your computer and use it in GitHub Desktop.
Save vsalbaba/175049 to your computer and use it in GitHub Desktop.
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