summarylogtreecommitdiffstats
path: root/emacs-openrc.install
diff options
context:
space:
mode:
authorManoel Vilela2016-11-26 00:09:25 -0300
committerManoel Vilela2016-11-26 00:09:25 -0300
commitf160121f6597723c980c221f8d4b13a102516228 (patch)
tree01752b3c89d243892f2040b2de676ab9e0870f5d /emacs-openrc.install
parentce3e2205ffa2e7e26a61583e18a8b4d7ee346a0b (diff)
downloadaur-f160121f6597723c980c221f8d4b13a102516228.tar.gz
Add 'export' keyword prefixed on conf using sed
This should fix some problems about variables. Actually I have some troubles with package exec-path-from-shell in my notebook. However i don't have the same problem on desktop. Why? On my old setup I used 'export' keyword to declare global variables.
Diffstat (limited to 'emacs-openrc.install')
-rw-r--r--emacs-openrc.install4
1 files changed, 2 insertions, 2 deletions
diff --git a/emacs-openrc.install b/emacs-openrc.install
index 886b5b4b53e4..1435068e8290 100644
--- a/emacs-openrc.install
+++ b/emacs-openrc.install
@@ -3,14 +3,14 @@ SERVICE_NAME_USER=emacs.$SUDO_USER
DEFAULT_CONF_PATH=/etc/conf.d/$SERVICE_NAME_USER
EMACS_DAEMON_PATH=/etc/init.d/$SERVICE_NAME
EMACS_DAEMON_USER_PATH=$EMACS_DAEMON_PATH.$SUDO_USER
-VARS_EXPORTED="SHELL\|USER\|HOME\|LANG"
+VARS_EXPORTED="SHELL\|^USER=\|HOME\|LANG"
post_install() {
sudo ln -v -s -f $EMACS_DAEMON_PATH $EMACS_DAEMON_USER_PATH
echo ":: Installed daemon for $SUDO_USER."
echo ":: Getting useful vars from $SUDO_USER."
- sudo -u $SUDO_USER env | grep $VARS_EXPORTED | sudo tee $DEFAULT_CONF_PATH
+ sudo -u $SUDO_USER env | grep $VARS_EXPORTED | sed "s/^/export /" | sudo tee $DEFAULT_CONF_PATH
echo ":: Wrote default conf on $DEFAULT_CONF_PATH"
echo ":: Add init script on openrc."