diff options
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | keyringer | 24 | ||||
-rwxr-xr-x | lib/keyringer/functions | 2 | ||||
-rw-r--r-- | share/keyringer/editors/vim (renamed from lib/keyringer/editors/vim) | 0 |
4 files changed, 20 insertions, 10 deletions
@@ -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 diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 5dbb6b4..42c047d 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -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 diff --git a/lib/keyringer/editors/vim b/share/keyringer/editors/vim index 0f877df..0f877df 100644 --- a/lib/keyringer/editors/vim +++ b/share/keyringer/editors/vim |