cirandas.net

ref: master

config/initializers/default_icon_theme.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
if File.writable?(Rails.root)
  # create the symlink to the default theme if it does not exist
  default = Rails.root.join('public', 'designs', 'icons', 'default')
  if !File.exists?(default)
    File.symlink('tango', default)
  end

  # create a symlink to system-wide Tango icon set if it does not exist
  tango_symlink = Rails.root.join('public', 'designs', 'icons', 'tango', 'Tango')
  if !File.exist?(tango_symlink)
    File.symlink('/usr/share/icons/Tango', tango_symlink)
  end
end