summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2017-02-05 14:24:50 (GMT)
committer Jaromil <jaromil@dyne.org>2017-02-05 14:24:50 (GMT)
commitcbb50423108f1dd0a9f93904fc126c3c35991f19 (patch)
tree8b2988153d2fce250a37d9093a20abc45bd63b32
parent865211124b5a8ea41cbda2f09110364b2ff78704 (diff)
refactored zuper and zlibs inclusion
-rwxr-xr-xsrc/jaro38
1 files changed, 23 insertions, 15 deletions
diff --git a/src/jaro b/src/jaro
index de85dd7..609bd96 100755
--- a/src/jaro
+++ b/src/jaro
@@ -67,9 +67,12 @@ fi
WORKDIR=${JAROWORKDIR:-$WORKDIR}
# load our zuper extension
-zkv=1
-helpers=1
-source $WORKDIR/zlibs/zuper
+# different load paths from inside source or installed
+if [ "$WORKDIR" = "../src" ]; then
+ source $WORKDIR/zuper/zuper
+else
+ source $WORKDIR/zlibs/zuper
+fi
# what operating system are we in? use os_detect()
@@ -193,17 +196,19 @@ PATH="$WORKDIR/bin:$PATH"
if [ -d $WORKDIR/zlibs ]; then
# if testing from source load uncompiled libs
if [ "$WORKDIR" = "../src" ]; then
- for z in `find $WORKDIR/zlibs -type f`; do
- [[ "$z" =~ "zuper" ]] && continue
- func "Loading zlib: ${z}"
- source ${z}
- done
+ for z in `find $WORKDIR/zlibs -type f`; do
+ [[ "$z" =~ "zuper" ]] && continue
+ func "Loading zlib: ${z}"
+ source ${z}
+ done
else
- for z in `find $WORKDIR/zlibs -type f | grep -v '.zwc$'`; do
- [[ "$z" =~ "zuper" ]] && continue
- func "Loading zlib: ${z}"
- source ${z}
- done
+ fpath+=($WORKDIR/zlibs)
+ for z in `ls $WORKDIR/zlibs`; do
+ [[ "$z" =~ "zuper" ]] && continue
+ [[ "$z" =~ ".zwc" ]] && continue
+ func "Loading zlib: ${z}"
+ source $WORKDIR/zlibs/${z}
+ done
fi
act "full set of auxiliary functions loaded"
@@ -221,8 +226,11 @@ fi
##########
# complete
-source $WORKDIR/zlibs/zuper.init
-
+if [ "$WORKDIR" = "../src" ]; then
+ source $WORKDIR/zuper/zuper.init
+else
+ source $WORKDIR/zlibs/zuper.init
+fi
ACCOUNTS="$MAILDIRS/Accounts"