Commit bfd71870 authored by Silvio Rhatto's avatar Silvio Rhatto
Browse files

Moving editors' files to shared folder

parent df97a807
......@@ -27,8 +27,8 @@ install_lib:
$(INSTALL) -D --mode=0755 lib/keyringer/functions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/functions
$(INSTALL) -D --mode=0755 -d lib/keyringer/actions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
$(INSTALL) -D --mode=0755 lib/keyringer/actions/* $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
$(INSTALL) -D --mode=0755 -d lib/keyringer/editors $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/editors
$(INSTALL) -D --mode=0644 lib/keyringer/editors/* $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/editors
$(INSTALL) -D --mode=0755 -d share/keyringer/editors $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/editors
$(INSTALL) -D --mode=0644 share/keyringer/editors/* $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/editors
install_bin:
$(INSTALL) -D --mode=0755 keyringer $(DESTDIR)/$(PREFIX)/bin/keyringer
......
......@@ -149,13 +149,6 @@ ACTION="$2"
# Turn off pathname expansion so expansion can work properly
set -f
# Export globals for other scripts
export PREFERENCES="`dirname $CONFIG`/$KEYRING"
export KEYRINGER_VERSION
export CONFIG_VERSION
export KEYRING
export CONFIG
# Set functions location
if [ -e "`dirname $(readlink -f $0)`/lib/$NAME/functions" ]; then
# Development or local installation layout
......@@ -165,6 +158,15 @@ else
LIB="`dirname $(readlink -f $0)`/../lib/$NAME/functions"
fi
# Set shared files location
if [ -e "`dirname $(readlink -f $0)`/share/$NAME" ]; then
# Development or local installation layout
SHARE="`dirname $(readlink -f $0)`/share/$NAME"
else
# System installation layout
SHARE="`dirname $(readlink -f $0)`/../share/$NAME"
fi
# Set actions location
if [ -e "`dirname $(readlink -f $0)`/lib/$NAME/actions" ]; then
# Development or local installation layout
......@@ -174,6 +176,14 @@ else
ACTIONS="`dirname $(readlink -f $0)`/../lib/$NAME/actions"
fi
# Export globals for other scripts
export PREFERENCES="`dirname $CONFIG`/$KEYRING"
export KEYRINGER_VERSION
export CONFIG_VERSION
export KEYRING
export CONFIG
export SHARE
# Load functions
source "$LIB" || exit 1
......
......@@ -287,7 +287,7 @@ function keyringer_set_env {
# Avoid viminfo, see https://keyringer.pw/trac/ticket/50
if $EDITOR --help | grep -q -e "^VIM"; then
if ! echo $EDITOR | grep -q -- "-i NONE"; then
EDITOR="$EDITOR -S `dirname $LIB`/editors/vim"
EDITOR="$EDITOR -S $SHARE/editors/vim"
fi
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment