File: fakeroot.rb

package info (click to toggle)
ruby-xdg 2.2.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 204 kB
  • sloc: ruby: 396; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'fileutils'

dir = File.expand_path(File.dirname(File.dirname(__FILE__)))

$froot = File.join(dir, 'fixtures/fakeroot/')

puts "Fake root at: `#{$froot}'."

#
ENV['HOME']            = $froot + 'home/joe'
#ENV['XDG_DATA_HOME']   = $froot + '.local/share'
ENV['XDG_DATA_DIRS']   = $froot + 'usr/share'
#ENV['XDG_CONFIG_HOME'] = $froot + '.config'
ENV['XDG_CONFIG_DIRS'] = $froot + 'etc/xdg' + ':' + $froot + 'etc'
#ENV['XDG_CACHE_HOME']  = $froot + '.cache'
ENV['XDG_CACHE_DIRS']  = $froot + 'tmp'