Sha256: 264f41a0fcbceb6fd273df67c5b31339c937d92bcefdedffc9743eb78081535f
Contents?: true
Size: 1.06 KB
Versions: 3
Compression:
Stored size: 1.06 KB
Contents
desc 'Install dependencies' def root_privileges_required! raise "Root privileges are required.\nPlease launch this task again as root." if ENV["USER"]!="root" end namespace :install_dependencies do # Not tested yet desc 'Install required packages on Debian' task :on_debian => :deb_packages # Tested successfully on 7.10 (gutsy) # odt2txt package not available on previous versions desc 'Install required packages on Ubuntu' task :on_ubuntu => :on_debian desc 'Install required gems and programs on Windows' task :on_windows_xp do #NOTE: Long way to go before it runs on XP. $stderr.puts "Implement me!" end desc 'Install required gems and packages on Mac Os' task :on_mac_os do $stderr.puts "Implement me!" end desc 'Install required .deb packages' task :deb_packages do root_privileges_required! #TODO: Should load this list from defined PlainText.filters packages=%w{antiword poppler-utils odt2txt html2text catdoc unrtf}.join(" ") puts "Installing "<<packages system("apt-get install "<<packages) end end
Version data entries
3 entries across 3 versions & 1 rubygems