diff packaging/linux-installer.inc.in @ 724:d280e2d39d5a

Introduced data-directory and fixed config-directory.
author Sascha Wilde <wilde@intevation.de>
date Wed, 02 Jul 2014 19:30:03 +0200
parents e71c59b16eee
children ce3e33e66a17
line wrap: on
line diff
--- a/packaging/linux-installer.inc.in	Wed Jul 02 16:19:18 2014 +0200
+++ b/packaging/linux-installer.inc.in	Wed Jul 02 19:30:03 2014 +0200
@@ -4,16 +4,17 @@
 ME=`basename "$0"`
 DEFAULT_PREFIX="$HOME/TrustBridge"
 SYSDEFAULT_PREFIX="/usr/local"
-CFGPATH="${XDG_DATA_HOME:-$HOME/.local/share}/BSI/TrustBridge"
+CFGPATH="${XDG_CONFIG_HOME:-$HOME/.config}/BSI"
+DATAPATH="${XDG_DATA_HOME:-$HOME/.local/share}/BSI/TrustBridge"
 SYSCFGPATH="/etc/TrustBridge"
-INSTCFGNAME="installation.cfg"
+INSTCFGNAME="TrustBridge-inst.cfg"
 FORCE=0
 SYSINST=0
 DEINSTALL=0
 BINNAMES="###BINNAMES###"
 
 declare -A instcfg oldinstcfg
-declare inst_default_prefix instcfg_path instcfg_file
+declare inst_default_prefix instdata_path instcfg_path instcfg_file
 instcfg=(
   [TIMESTMP]=`date -u +%Y%m%d%H%M%S`
   [VERSION]='@PROJECT_VERSION@'
@@ -134,10 +135,12 @@
   if [ $SYSINST -eq 1 ] ; then
       inst_default_prefix="$SYSDEFAULT_PREFIX"
       instcfg_path="${SYSCFGPATH}"
-
+      # TODO: where is the system wide installation data path?
+      instdata_path="${SYSCFGPATH}"
   else
     inst_default_prefix="$DEFAULT_PREFIX"
     instcfg_path="${CFGPATH}"
+    instdata_path="${DATAPATH}"
   fi
     instcfg_file="${instcfg_path}/${INSTCFGNAME}"
 }
@@ -171,7 +174,7 @@
 deinstall_certs()
 {
   local cinst="${oldinstcfg[PREFIX]}/bin/cinst"
-  local certlist=`ls -1  ${instcfg_path}/list-*.txt | sort -nr | head -n 1`
+  local certlist=`ls -1  ${instdata_path}/list-*.txt | sort -nr | head -n 1`
 
   echo "Uninstalling certificates ..."
   

http://wald.intevation.org/projects/trustbridge/