]> git.decadent.org.uk Git - ion3.git/blobdiff - utils/ion-completeman.in
[svn-upgrade] Integrating new upstream version, ion3 (20071220)
[ion3.git] / utils / ion-completeman.in
index 969839bbddb452c217e730561fadb34181442063..135efaf248dc5855e06103b22c66c3df98670c71 100644 (file)
@@ -107,15 +107,15 @@ if test "x$HOME" != x; then
     usercache="$HOME/.ion3/mancache"
 fi
 
-syscache="@VARDIR@/mancache"
+vardir=${ION_VAR_PATH-@VARDIR@}
+syscache="$vardir/mancache"
+
 
 case "$action" in
     complete)
         if test "x$usercache" != x -a -f "$usercache"; then
             cachefile="$usercache"
-        fi
-        
-        if test -f "$syscache"; then
+        elif test -f "$syscache"; then
             cachefile="$syscache"
         fi
         
@@ -136,7 +136,7 @@ case "$action" in
         fi
         ;;
     mksyscache)
-        mkdir -p "@VARDIR@"
+        mkdir -p "$vardir"
         scan > "$syscache"
         ;;
 esac