Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
d394c6d9
Commit
d394c6d9
authored
Feb 17, 2021
by
satmandu
Committed by
GitHub
Feb 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add env variables to bashrc automatically (#5153)
parent
74006981
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
packages/xdg_base.rb
packages/xdg_base.rb
+16
-15
No files found.
packages/xdg_base.rb
View file @
d394c6d9
...
...
@@ -3,7 +3,7 @@ require 'package'
class
Xdg_base
<
Package
description
'XDG Base Directory Specification Configuration'
homepage
'https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html'
version
'0.7-
5
'
version
'0.7-
6
'
compatibility
'all'
source_url
'file:///dev/null'
source_sha256
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
...
...
@@ -29,18 +29,19 @@ class Xdg_base < Package
end
def
self
.
postinstall
puts
puts
'The following environment variables should be set as shown below:'
.
lightblue
puts
puts
"echo '# XDG Base Directory Specification Environment Variables' >> ~/.bashrc"
.
lightblue
puts
"echo '# See https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html' >> ~/.bashrc"
.
lightblue
puts
"echo 'export XDG_DATA_HOME=
#{
HOME
}
/.local/share' >> ~/.bashrc"
.
lightblue
puts
"echo 'export XDG_CONFIG_HOME=
#{
HOME
}
/.config' >> ~/.bashrc"
.
lightblue
puts
"echo 'export XDG_DATA_DIRS=
#{
CREW_PREFIX
}
/share' >> ~/.bashrc"
.
lightblue
puts
"echo 'export XDG_CONFIG_DIRS=
#{
CREW_PREFIX
}
/etc/xdg' >> ~/.bashrc"
.
lightblue
puts
"echo 'export XDG_CACHE_HOME=
#{
HOME
}
/.cache' >> ~/.bashrc"
.
lightblue
puts
"echo 'export XDG_RUNTIME_DIR=/var/run/chrome' >> ~/.bashrc"
.
lightblue
puts
'source ~/.bashrc'
.
lightblue
puts
xdgconfig_in_bashrc
=
`grep -c "XDG_CONFIG_HOME" ~/.bashrc || true`
unless
xdgconfig_in_bashrc
.
to_i
.
positive?
puts
'Putting XDG Environment Variables in ~/.bashrc'
.
lightblue
system
"echo '# XDG Base Directory Specification Environment Variables' >> ~/.bashrc"
system
"echo '# See https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html' >> ~/.bashrc"
system
"echo 'export XDG_DATA_HOME=
#{
HOME
}
/.local/share' >> ~/.bashrc"
system
"echo 'export XDG_CONFIG_HOME=
#{
HOME
}
/.config' >> ~/.bashrc"
system
"echo 'export XDG_DATA_DIRS=
#{
CREW_PREFIX
}
/share' >> ~/.bashrc"
system
"echo 'export XDG_CONFIG_DIRS=
#{
CREW_PREFIX
}
/etc/xdg' >> ~/.bashrc"
system
"echo 'export XDG_CACHE_HOME=
#{
HOME
}
/.cache' >> ~/.bashrc"
system
"echo 'export XDG_RUNTIME_DIR=/var/run/chrome' >> ~/.bashrc"
puts
'To complete the installation, execute the following:'
.
orange
puts
'source ~/.bashrc'
.
orange
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment