ivyl / gedit-mate

Gedit set of plugins, tools, color schemes and snippets that will improve your work.

This URL has Read+Write access

gedit-mate / Rakefile
100644 24 lines (20 sloc) 0.647 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
include FileUtils
GEDIT = File.join ENV['HOME'], '.gnome2/gedit/'
 
namespace :install do
  desc 'install snippets, plugins and styles locally'
  task :local do
    mkdir_p GEDIT
    %w(plugins snippets styles).each do |dir|
      cp_r dir, GEDIT
    end
  end
  
  desc 'install lang-specs, mime types and \'g\', command needs root priviliges'
  task :global do
    cp 'mime/rails.xml', '/usr/share/mime/packages/'
    %w(rhtml.lang ruby.lang yml.lang).each do |file|
      cp 'lang-specs/' + file, '/usr/share/gtksourceview-2.0/language-specs/'
    end
    cp 'bin/g', '/usr/bin/g'
    print `update-mime-database /usr/share/mime`
  end
end