add config-update-helper.py (allows updating of the user configuration from...

add config-update-helper.py (allows updating of the user configuration from shell, without having to invoke the user interface)
parent b0e510f2
......@@ -9,20 +9,24 @@
# #
#########################################################
export NO_AT_BRIDGE=1
export BSNG_UI_PREFIX="@PREFIX@"
export BSNG_UI_VERSION="@VERSION@"
export BSNG_DATADIR="@DATADIR@"
export PYTHONPATH="${PYTHONPATH}:@DATADIR@/bashstyle-ng/ui"
case ${1} in
--python | -p ) shift
echo "@PYTHON@"
[[ "${@}" ]] && @PYTHON@ "${@}"
;;
* )
export NO_AT_BRIDGE=1
export BSNG_UI_PREFIX="@PREFIX@"
export BSNG_UI_VERSION="@VERSION@"
export BSNG_DATADIR="@DATADIR@"
export PYTHONPATH="${PYTHONPATH}:@DATADIR@/bashstyle-ng/ui"
--update | -u )
@PYTHON@ @DATADIR@/bashstyle-ng/ui/config-update-helper.py
;;
* )
@PYTHON@ @DATADIR@/bashstyle-ng/ui/bs-ng.py "${@}"
;;
esac
#########################################################
# #
# This is BashStyle-NG #
# #
# Licensed under GNU GENERAL PUBLIC LICENSE v3 #
# #
# Copyright 2007 - 2016 Christopher Bratusek #
# #
#########################################################
import gettext, os
lang = gettext.translation('bashstyle', fallback=True)
lang.install(names=['_'])
import config
print (_("BashStyle-NG configuration update helper."))
cfg = config.Config()
cfg.InitConfig()
cfg.LoadConfig()
cfg.CheckConfig()
cfg.WriteConfig()
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