#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG  				#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2015 Christopher Bratusek		#
#							#
#########################################################

APP_NAME="BashStyle-NG"
APP_VERSION=9.0
APP_CODENAME="A New Wave"
APP_LANGUAGES="de"

CFG_VERSION="4.3.3"

if [[ -d "/usr/lib/girepository-1.0/" ]]; then
	export GIRPATH="/usr/lib/girepository-1.0/"
elif [[ -d "/usr/lib64/girepository-1.0/" ]]; then
	export GIRPATH="/usr/lib64/girepository-1.0/"
fi

PREFIX="/usr"
MODE=user
QUIET=false
PYTHON=$(which python3 || which python2 || which python)

BINDIR="${PREFIX}/bin"
PCDIR="${PREFIX}/share/pkgconfig/"
DATADIR="${PREFIX}/share/"
PROFILEDIR="/etc/"

for lang in ${APP_LANGUAGES[@]}; do
	LC_MESSAGES_DIRS="${LC_MESSAGES_DIRS} ${lang}/LC_MESSAGES/"
done

export OLDPATH=${PATH}
export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin"

export_result ()
{

	echo -e "PREFIX=\"${PREFIX}\"
DATADIR=\"${DATADIR}/bashstyle-ng/\"
DATADIR_LIST=( ui rc/{functions,internal,settings,styles} termcap/{bar,body} vim/colors )
PROFILEDIR=\"${PROFILEDIR}/\"
BINDIR=\"${BINDIR}\"
LOCALEDIR=\"${DATADIR}/locale/\"
LOCALEDIR_LIST=( ${LC_MESSAGES_DIRS} )
ICONDIR=\"${DATADIR}/icons/hicolor/32x32/apps/\"
DESKTOPDIR=\"${DATADIR}/applications/\"
PCDIR=\"${PCDIR}/\"
BASHFILE=\"${BASHFILE}\"
APP_LANGUAGES=\"${APP_LANGUAGES}\"" | sed -e 's,//,/,g' >> ${PWD}/.configure/results

}
