Created
May 23, 2011 02:51
-
-
Save cfebs/986134 to your computer and use it in GitHub Desktop.
A fix for the install script in gedit-rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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