vendor config support for bs-ng-wizard

parent 2840e5d7
......@@ -23,7 +23,7 @@ LOCALE_FILES=( i18n/de/*.mo:${LOCALEDIR}/de/LC_MESSAGES/
DOC_FILES=( docs/*.html:${DOCDIR}
docs/img/*.png:${DOCDIR}/img
docs/img-style/*.png:${DOCDIR}/img-style
{AUTHORS,COPYING.CODE,COPYING.ICONS,CREDITS,NEWS,README}:${DOCDIR} )
{AUTHORS,COPYING,COPYING.ICONS,CREDITS,NEWS,README}:${DOCDIR} )
BIN_FILES=( data/bashstyle:${BINDIR}
bin-extra/*:${DATADIR}/bin
......
......@@ -6,12 +6,14 @@ Overview of changes in v8.2 "Fate of the Galaxy"
fix python check if version number contains '+'
=== Other changes ===
* bashstyle.sh from /etc/profile.d to /etc
* fix many lintian warnings, improve debian packaging scripts
* move bashstyle.sh from /etc/profile.d to /etc
* let nx-rc create a default $HOME/.bs-ng.ini if none exists
* improve loading settings, it's now really possible to only
use readline settings, but not bash or any other constellation
* add posibility to use a vendor provided config if user
does not have $HOME/.bs-ng.ini (/etc/bs-ng_vendor.ini)
does not have $HOME/.bs-ng.ini (/etc/bs-ng_vendor.ini),
or no $HOME/.bs-ng-wizard.ini (/etc/bs-ng-wizard_vendor.ini)
* make bashstyle.sh load BashStyle-NG on shell startup,
(if enabled in users $HOME/.bs-ng.ini)
......
......@@ -13,17 +13,18 @@
TEXTDOMAIN="bs-ng-wizard"
source $BSNG_RC_DIR/internal/misc
MODULES=( ini basic cdwriter git lscd reprepro svn user )
for mod in ${MODULES[@]}; do
source $BSNG_RC_DIR/wizard/$mod
done
CURRENT_WIZARD=1
source $BSNG_RC_DIR/wizard/ini
if [[ ! -e $HOME/.bs-ng-wizard.ini ]]; then
cp $BSNG_DATA_DIR/bashstyle-ng/bs-ng-wizard.ini $HOME/.bs-ng-wizard.ini
STAGE=INIT
if [[ ! -f ${HOME}/.bs-ng-wizard.ini ]]; then
if [[ -f /etc/bs-ng-wizard_vendor.ini ]]; then
cp /etc/bs-ng-wizard_vendor.ini ${HOME}/.bs-ng-wizard.ini
STAGE=KEEP
else
cp ${BSNG_DATA_DIR}/bashstyle-ng/bs-ng-wizard.ini ${HOME}/.bs-ng-wizard.ini
STAGE=INIT
fi
fi
elif [[ $(wizard_get ini_version) < $CURRENT_WIZARD ]]; then
bs-ng-wizard.update
STAGE=UPDATE
......@@ -31,13 +32,20 @@ elif [[ $(wizard_get ini_version) == $CURRENT_WIZARD ]]; then
STAGE=KEEP
fi
MODULES=( basic cdwriter git lscd reprepro svn user )
for mod in ${MODULES[@]}; do
source $BSNG_RC_DIR/wizard/$mod
done
CURRENT_WIZARD=1
if [[ $1 == *force ]]; then
cp $BSNG_DATA_DIR/bashstyle-ng/bs-ng-wizard.ini $HOME/.bs-ng-wizard.ini
STAGE=INIT
shift
fi
export RC_FILE=$HOME/.bashstyle.wizard
export RC_FILE=$HOME/.bs-ng-wizard.ini
case $STAGE in
......
......@@ -9,7 +9,11 @@
# #
#########################################################
verbose=$(wizard_get debug_verbose)
if [[ -e $HOME/.bs-ng-wizard.ini ]]; then
verbose=$(wizard_get debug_verbose)
else
verbose=False
fi
dbg_msg ()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment