wilde@680: #!/bin/bash wilde@680: wilde@698: ME=`basename "$0"` wilde@698: DEFAULT_PREFIX=/usr/local wilde@700: CFGPATH="${XDG_DATA_HOME:-$HOME/.local/share}/BSI/TrustBridge" wilde@700: SYSCFGPATH="/etc/TrustBridge" wilde@700: INSTCFGNAME="installation.cfg" wilde@698: wilde@700: instcfg_file="${CFGPATH}/${INSTCFGNAME}" wilde@700: declare -A instcfg wilde@700: instcfg=( wilde@700: [TIMESTMP]=`date -u +%Y%m%d%H%M%S` wilde@700: [VERSION]='@PROJECT_VERSION@' wilde@700: [PREFIX]='' wilde@700: ) wilde@698: wilde@698: version() wilde@698: { wilde@698: cat <=2). See LICENSE.txt for details. wilde@698: There is NO WARRANTY, to the extent permitted by law. wilde@698: EOF wilde@698: exit 0 wilde@698: } wilde@680: wilde@680: fatal() wilde@680: { wilde@680: echo "$1" >&2 wilde@680: echo "Installation failed." >&2 wilde@680: exit 1 wilde@680: } wilde@680: wilde@698: usage() wilde@698: { wilde@698: cat <"$instcfg_file" wilde@700: for key in "${!instcfg[@]}" ; do wilde@700: echo "${key}=${instcfg[$key]}" >>"$instcfg_file" wilde@700: done wilde@700: } wilde@700: wilde@698: #====================================================================== wilde@698: # main() wilde@698: wilde@698: parse_args "$@" wilde@698: wilde@680: cat <