Permalink
Browse files

update installer for gedit 3

  • Loading branch information...
janlelis committed Oct 9, 2011
1 parent 74012d5 commit 9a175b522766300283c2d7490bc8eed48d5f18c1
Showing with 24 additions and 16 deletions.
  1. +4 −0 README.rdoc
  2. +20 −16 bin/rubybuntu-gedit
View
@@ -18,6 +18,10 @@ Either checkout the sub-repositories (in the data directory) and install each on
gem install rubybuntu-gedit
rubybuntu-gedit install
+
+For gedit 3, replace the last line with:
+
+ rubybuntu-gedit install -3
Want to tweak parts of the source to your needs? Try this one in the project dir:
View
@@ -25,9 +25,11 @@ if ARGV.shift != 'install'
end
@sudo = false # auto sudo
+@gedit = 3
-if ARGV.empty?
+if ARGV.reject{|e| e[0] == '-' }.empty?
@todo = [:specs, :mime, :styles, :snippets]
+ ARGV.clear
else
@todo = []
while arg = ARGV.shift
@@ -42,6 +44,8 @@ else
@todo << :styles
when /snippets/
@todo << :snippets
+ when "-3"
+ @gedit = 3
end
end
end
@@ -67,27 +71,27 @@ end
# language specs
def specs
puts Paint["\nLet's start with copying the language specs\n", :underline]
- print "Q] Do you want to install the languages specs as sudo [/usr/share/gtksourceview-2.0/language-specs]\n" \
- " or in your home directory [~/.local/share/gtksourceview-2.0/language-specs]? [Sh] "
+ print "Q] Do you want to install the languages specs as sudo [/usr/share/gtksourceview-#@gedit.0/language-specs]\n" \
+ " or in your home directory [~/.local/share/gtksourceview-#@gedit.0/language-specs]? [Sh] "
if @sudo || gets.chop =~ /^s?$/i
- action "sudo cp #@data/language-specs/*.lang /usr/share/gtksourceview-2.0/language-specs"
+ action "sudo cp #@data/language-specs/*.lang /usr/share/gtksourceview-#@gedit.0/language-specs"
else
- action "mkdir -p ~/.local/share/gtksourceview-2.0/language-specs\n" \
- " cp #@data/language-specs/*.lang ~/.local/share/gtksourceview-2.0/language-specs"
+ action "mkdir -p ~/.local/share/gtksourceview-#@gedit.0/language-specs\n" \
+ " cp #@data/language-specs/*.lang ~/.local/share/gtksourceview-#@gedit.0/language-specs"
end
- check_existence '/usr/share/gtksourceview-2.0/language-specs/rhtml.lang', true
- check_existence '/usr/share/gtksourceview-2.0/language-specs/ruby_on_rails.lang', true
- check_existence '~/.local/share/gtksourceview-2.0/language-specs/rhtml.lang', false
- check_existence '~/.local/share/gtksourceview-2.0/language-specs/ruby_on_rails.lang', false
+ check_existence '/usr/share/gtksourceview-#@gedit.0/language-specs/rhtml.lang', true
+ check_existence '/usr/share/gtksourceview-#@gedit.0/language-specs/ruby_on_rails.lang', true
+ check_existence '~/.local/share/gtksourceview-#@gedit.0/language-specs/rhtml.lang', false
+ check_existence '~/.local/share/gtksourceview-#@gedit.0/language-specs/ruby_on_rails.lang', false
end
# # #
# mime
def mime
puts Paint["\nNow the mime types should be updated\n", :underline]
print "Q] Do you want to install the mime types as sudo [/usr/share/mime/packages]\n" \
- " or in your home directory [~/.local/share/gtksourceview-2.0/language-specs]? [Sh] "
+ " or in your home directory [~/.local/share/gtksourceview-#@gedit.0/language-specs]? [Sh] "
if @sudo || gets.chop =~ /^s?$/i
action "sudo cp #@data/mime/*.xml /usr/share/mime/packages\n" \
" sudo update-mime-database /usr/share/mime"
@@ -105,13 +109,13 @@ end
# styles
def styles
puts Paint["\nNow, some styles get copied that use the new language specs :)\n", :underline]
- print "Q] Do you want to install the styles as sudo [/usr/share/gtksourceview-2.0/styles]\n" \
- " or in your home directory [~/.local/share/gtksourceview-2.0/styles]? [Sh] "
+ print "Q] Do you want to install the styles as sudo [/usr/share/gtksourceview-#@gedit.0/styles]\n" \
+ " or in your home directory [~/.local/share/gtksourceview-#@gedit.0/styles]? [Sh] "
if @sudo || gets.chop =~ /^s?$/i
- action "sudo cp #@data/styles/*.xml /usr/share/gtksourceview-2.0/styles"
+ action "sudo cp #@data/styles/*.xml /usr/share/gtksourceview-#@gedit.0/styles"
else
- action "mkdir -p ~/.local/share/gtksourceview-2.0/styles\n" \
- " cp #@data/styles/*.xml ~/.local/share/gtksourceview-2.0/styles"
+ action "mkdir -p ~/.local/share/gtksourceview-#@gedit.0/styles\n" \
+ " cp #@data/styles/*.xml ~/.local/share/gtksourceview-#@gedit.0/styles"
end
end

0 comments on commit 9a175b5

Please sign in to comment.