Skip to content

Instantly share code, notes, and snippets.

@cfebs
Created May 23, 2011 02:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfebs/986134 to your computer and use it in GitHub Desktop.
Save cfebs/986134 to your computer and use it in GitHub Desktop.
A fix for the install script in gedit-rails
desc "Installs the Plugins"
task :setup do
gedit_is_running = system("ps -eo comm | grep ^gedit$")
user = ENV['USER']
if gedit_is_running then
puts "Please close gedit"
elsif user != "root" then
puts "You need to sudo this action"
else
#system("killall gedit")
system("cp rails.xml /usr/share/mime/packages")
system("update-mime-database /usr/share/mime")
system("cp erb.lang /usr/share/gtksourceview-2.0/language-specs/")
system("cp yaml.lang /usr/share/gtksourceview-2.0/language-specs/")
system("mkdir -p ~/.gnome2/gedit") unless File.directory? ENV['HOME'] + "/.gnome2/gedit"
system("cp -R snippets ~/.gnome2/gedit/")
system("mkdir -p ~/.gnome2/gedit/plugins") unless File.directory? ENV['HOME'] + "/.gnome2/gedit/plugins"
system("cp -R plugins/* ~/.gnome2/gedit/plugins/")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment