Created
August 25, 2009 21:33
-
-
Save vsalbaba/175049 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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