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

APP_NAME="BashStyle-NG"
APP_VERSION=10.0
APP_CODENAME="10th Anniversary Version"
APP_LANGUAGES="de"

CFG_VERSION="4.3.8"

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"
PYTHON=$(which python3 || which python2 || which python)

BINDIR="${PREFIX}/bin"
PCDIR="${PREFIX}/share/pkgconfig"
DATADIR="${PREFIX}/share"
DOCDIR="${DATADIR}/doc"
MANDIR="${DATADIR}/man"

PYMINVER_P="2.7.0"
PYMAXVER_P="3.9.0"

PYMINVER=${PYMINVER_P//.}
PYMAXVER=${PYMAXVER_P//.}

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}\"
prefix=\"${PREFIX}\"
DATADIR=\"${DATADIR}/bashstyle-ng\"
DATADIR_LIST=( ui rc/{2048,functions,internal,settings,styles} vim/colors )
DOCDIR=\"${DOCDIR}/bashstyle-ng\"
MANDIR=\"${MANDIR}/man1\"
BINDIR=\"${BINDIR}\"
LOCALEDIR=\"${DATADIR}/locale\"
LOCALEDIR_LIST=( ${LC_MESSAGES_DIRS} )
ICONDIR=\"${DATADIR}/icons/hicolor/32x32/apps\"
DESKTOPDIR=\"${DATADIR}/applications\"
PCDIR=\"${PCDIR}\"
APP_LANGUAGES=\"${APP_LANGUAGES}\"" | sed -e 's,//,/,g' >> "${PWD}"/.configure/results

}
