Install bashstyle-config-helper launcher script.

parent 613429cb
......@@ -9,7 +9,7 @@
# #
#########################################################
IN_FILES=( rc/bashstyle-rc data/bashstyle data/bashstyle-ng.pc )
IN_FILES=( rc/bashstyle-rc data/bashstyle data/bashstyle-config-helper data/bashstyle-ng.pc )
copy_in_files () {
......
......@@ -38,10 +38,10 @@ make_remove () {
post_remove
}
CLEAN_FILES=( data/bashstyle data/bashstyle-ng.pc ui/bashstyle.ui.h
rc/bashstyle-rc i18n/??/*.mo i18n/*.pot .configure/results
.make/build_done ui/#bashstyle.ui# ui/bashstyle.ui~
doc/bashstyle.info doc/*.gz )
CLEAN_FILES=( data/bashstyle data/bashstyle-config-helper data/bashstyle-ng.pc
ui/bashstyle.ui.h rc/bashstyle-rc i18n/??/*.mo i18n/*.pot
.configure/results .make/build_done ui/#bashstyle.ui#
ui/bashstyle.ui~ doc/bashstyle.info doc/*.gz )
CLEAN_DIRS=( doc/html )
......
......@@ -28,6 +28,7 @@ for lang in ${APP_LANGUAGES}; do
done
BIN_FILES=( data/bashstyle:${BINDIR}
data/bashstyle-config-helper:${BINDIR}
rc/functions/*:${DATADIR}/rc/functions
rc/2048/2048:${DATADIR}/rc/2048)
......
......@@ -46,6 +46,8 @@ of the bashstyle launcher script.
@item More versatile @code{config-update-helper}.
@itemize x
@item Install @code{bashstyle-config-helper} launcher script.
@item Add backup, restore and reset actions to @code{config-update-helper}.
@item Add @code{-b}, @code{--backup} command line arg to bashstyle, which will
......
......@@ -27,6 +27,19 @@ class ConfigUpdateHelper(object):
\nBashStyle-NG configuration update helper.\
\nLicensed under the GNU GENERAL PUBLIC LICENSE v3"))
parser.add_option("-v", "--version", dest="version",
action="store_true", default=False, help=_("print version and exit"))
parser.add_option("-p", "--prefix", dest="prefix",
action="store_true", default=False, help=_("print installation prefix and exit"))
parser.add_option("-P", "--python", dest="python",
action="store_true", default=False, help=_("print used Python interpreter;\
if additional args are given they will be passed to the used Python interpreter."))
parser.add_option("-d", "--doc", dest="doc",
action="store_true", default=False, help=_("open HTML documentation and exit"))
parser.add_option("-u", "--update", dest="update",
action="store_true", default=False, help=_("update user configuration and exit"))
......@@ -41,6 +54,14 @@ class ConfigUpdateHelper(object):
(options, args) = parser.parse_args()
if options.version:
print("%s" % os.getenv('BSNG_VERSION'))
sys.exit(0)
if options.prefix:
print("%s" % os.getenv('BSNG_PREFIX'))
sys.exit(0)
if options.update:
cfg.InitConfig()
cfg.LoadConfig()
......
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