Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Cogglecraft main
- require_relative "lib/download"
- require_relative "lib/mkdir"
- require_relative "lib/things"
- require_relative "lib/get_platform_natives"
- require_relative "lib/has_installed"
- begin
- Coggle.mkdir($dirs)
- $files.each do |file|
- Coggle.download(file, 'tmp/')
- end
- Coggle.get_platform_natives
- if $platform == 'windows'
- Coggle.download('dl.dropbox.com/u/24529/CoggleClient/bspatch.exe', 'tmp/')
- else
- if Coggle.has_installed? "bspatch"
- 0
- else
- puts "Please install bspatch and try again. Or, add the executable to a folder in your path."
- 1.upcase # <-- LoL producing an exception error so I dont have to rewrite the `rm` s
- end
- end
- Thread.new do Coggle.download('dl.dropbox.com/u/24529/CoggleClient/patch-1.8.1.zip', 'tmp/') end
- Coggle.download('dev.bukkit.org/media/files/552/170/spoutcraft-dev-SNAPSHOT.zip', 'tmp/', 'spoutcraft.zip')
- Thread.new do Coggle.download('dl.dropbox.com/u/24529/CoggleClient/version', 'etc/') end
- if $platform == 'linux'
- if Coggle.has_installed? "unlzma"
- `cd tmp; unlzma linux_natives.jar.lzma`
- else
- puts "Please install lzma and try again. Or, add the unlzma executable to a folder in your path."
- 1.upcase # <--- LoL another error
- end
- elsif $platform == "windows"
- #blah
- end
- rescue Exception => e
- `rm -rf ./etc`
- `rm -rf ./tmp`
- `rm -rf ./bin`
- puts e.backtrace
- puts "Failed to install client."
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement