]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Moving editors' files to shared folder
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 21 Aug 2014 18:04:52 +0000 (15:04 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 21 Aug 2014 18:04:52 +0000 (15:04 -0300)
Makefile
keyringer
lib/keyringer/functions
share/keyringer/editors/vim [moved from lib/keyringer/editors/vim with 100% similarity]

index c1e50e9e16e3cfc25b0978c985e6ae6cf1ab83f3..07513f2ce1dd753398e2bd09ccc0bfc3391fa6cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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
index b8edc8e799c5d193ec5539923a48900ac6e0e5df..a32f15b194f7bcccebc94bcfb186571539c6d744 100755 (executable)
--- a/keyringer
+++ b/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
 
index 5dbb6b4c160d783ca3c4a6b4bc49d4d92621e066..42c047d282b32f8b9ffed629d3bf36b764f38a26 100755 (executable)
@@ -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