summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorManoel Vilela2016-11-26 00:09:25 -0300
committerManoel Vilela2016-11-26 00:09:25 -0300
commitf160121f6597723c980c221f8d4b13a102516228 (patch)
tree01752b3c89d243892f2040b2de676ab9e0870f5d
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.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--emacs-openrc.install4
3 files changed, 4 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5ed0ec95a7e..42880e34d96 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = emacs-openrc
pkgdesc = OpenRC emacs-daemon init script
pkgver = 1.0
- pkgrel = 3
+ pkgrel = 4
install = emacs-openrc.install
changelog = CHANGELOG
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index 3c1f841ba87..e6effa62970 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname="emacs-openrc"
pkgver="1.0"
-pkgrel=3
+pkgrel=4
pkgdesc="OpenRC emacs-daemon init script"
arch=('i686' 'x86_64')
license=('GPL3')
diff --git a/emacs-openrc.install b/emacs-openrc.install
index 886b5b4b53e..1435068e829 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."