autospec, plugins: add the option '-C|--config' for selecting a different user configuration file or list of user configuration files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
8eee8ae037
commit
15f3575b2e
@ -9,6 +9,11 @@ Changes in version 1.14.3
|
|||||||
* autospec - Davide Madrisan:
|
* autospec - Davide Madrisan:
|
||||||
Add some update debug messages.
|
Add some update debug messages.
|
||||||
|
|
||||||
|
+ improvement
|
||||||
|
* autospec, plugins/* - Davide Madrisan:
|
||||||
|
Add the option '-C|--config' for selecting a different user configuration
|
||||||
|
file or list of user configuration files.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.14.2
|
Changes in version 1.14.2
|
||||||
|
22
autospec.in
22
autospec.in
@ -62,9 +62,12 @@ function autospec.usage() {
|
|||||||
-h, --help "$"Print this help, then exit""
|
-h, --help "$"Print this help, then exit""
|
||||||
-V, --version "$"Print version number, then exit""
|
-V, --version "$"Print version number, then exit""
|
||||||
-q, --quiet "$"Run in quiet mode""
|
-q, --quiet "$"Run in quiet mode""
|
||||||
--colors "$"Select the theme to be used for the colorized output""
|
|
||||||
-D, --debug "$"Run in debugging mode (very verbose output)""
|
-D, --debug "$"Run in debugging mode (very verbose output)""
|
||||||
|
|
||||||
|
"$"Common options"":
|
||||||
|
--colors "$"Select the theme to be used for the colorized output""
|
||||||
|
-C, --config "$"Use an alternate user configuration file""
|
||||||
|
|
||||||
"$"Usage"":
|
"$"Usage"":
|
||||||
"$"Use '-u -h', '-s -h', '-x -h', and '--eval -h' to display specific command line options.""
|
"$"Use '-u -h', '-s -h', '-x -h', and '--eval -h' to display specific command line options.""
|
||||||
|
|
||||||
@ -132,21 +135,28 @@ while (($# > 0)); do
|
|||||||
notify.warning $"\
|
notify.warning $"\
|
||||||
deprecated option"" \`-r|--colorize': "$"use \`--colors' instead"
|
deprecated option"" \`-r|--colorize': "$"use \`--colors' instead"
|
||||||
# for backward compatibility
|
# for backward compatibility
|
||||||
color_scheme="default" ;;
|
selected_color_scheme="default" ;;
|
||||||
--colors)
|
|
||||||
read_arg color_scheme "$@" ||
|
|
||||||
{ shift; args[${#args[*]}]="$1"; } ;;
|
|
||||||
-h|--help)
|
-h|--help)
|
||||||
let "print_help = 1" ;;
|
let "print_help = 1" ;;
|
||||||
-V|--version)
|
-V|--version)
|
||||||
let "print_version = 1" ;;
|
let "print_version = 1" ;;
|
||||||
|
--colors)
|
||||||
|
read_arg selected_color_scheme "$@" ||
|
||||||
|
{ shift; args[${#args[*]}]="$1"; } ;;
|
||||||
|
-C|--config)
|
||||||
|
read_arg custom_cfgfile_list "$@" ||
|
||||||
|
{ shift; args[${#args[*]}]="$1"; } ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
notify.debug "[${me[0]}, "$"version"" ${me[1]}]"
|
notify.debug "[${me[0]}, "$"version"" ${me[1]}]"
|
||||||
notify.debug "color_scheme = \"$color_scheme\""
|
|
||||||
|
[ "$selected_color_scheme" ] || color_scheme="$selected_color_scheme"
|
||||||
|
|
||||||
|
notify.debug "custom_cfgfile_list = \"$custom_cfgfile_list\""
|
||||||
|
cfg_load_files "$custom_cfgfile_list"
|
||||||
|
|
||||||
case "$(( $pck_update + $spec_create + $pck_extract + $config_getvar ))" in
|
case "$(( $pck_update + $spec_create + $pck_extract + $config_getvar ))" in
|
||||||
0) [ "$print_help" = "1" ] && autospec.usage 0
|
0) [ "$print_help" = "1" ] && autospec.usage 0
|
||||||
|
@ -17,7 +17,7 @@ fi
|
|||||||
TEXTDOMAIN="libcfg"; export TEXTDOMAIN
|
TEXTDOMAIN="libcfg"; export TEXTDOMAIN
|
||||||
|
|
||||||
# list of the configuration file(s)
|
# list of the configuration file(s)
|
||||||
default_cfg=(\
|
default_cfg_list=(\
|
||||||
`ls /etc/@package@.conf /etc/@package@.d/*.conf \
|
`ls /etc/@package@.conf /etc/@package@.d/*.conf \
|
||||||
~/.@package@ ~/.@package@.d/*.conf 2>/dev/null`)
|
~/.@package@ ~/.@package@.d/*.conf 2>/dev/null`)
|
||||||
|
|
||||||
@ -100,16 +100,32 @@ missing variable in the configuration file"" -- \`$cfg_var'"
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_files_num=0
|
# load configuration files
|
||||||
for cfg_file in ${default_cfg[*]}; do
|
function cfg_load_files() {
|
||||||
if [ -e "$cfg_file" ]; then
|
notify.debug "$FUNCNAME: loading configuration files..."
|
||||||
cfg_files_num=$(($cfg_files_num + 1))
|
if [ "$1" ]; then
|
||||||
notify.debug $"loading"": \`$cfg_file'..."
|
# select a different list of user configuration files
|
||||||
[ -r "$cfg_file" ] || notify.error $"cannot read"" \`$cfg_file'"
|
cfgfile_list=(\
|
||||||
. "$cfg_file"
|
`ls /etc/@package@.conf /etc/@package@.d/*.conf` $1)
|
||||||
|
else
|
||||||
|
# default configuration files
|
||||||
|
cfgfile_list=(${default_cfg_list[@]})
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
[ "$cfg_files_num" = 0 ] && notify.error $"configuration file not found"
|
notify.debug "$FUNCNAME: cfgfile_list = (${cfgfile_list[*]})"
|
||||||
|
|
||||||
unset cfg_file
|
local cfg_file
|
||||||
|
local cfg_files_num=0
|
||||||
|
for cfg_file in ${cfgfile_list[*]}; do
|
||||||
|
if [ -e "$cfg_file" ]; then
|
||||||
|
cfg_files_num=$(($cfg_files_num + 1))
|
||||||
|
notify.debug $"loading"": \`$cfg_file'..."
|
||||||
|
[ -r "$cfg_file" ] || notify.error $"cannot read"" \`$cfg_file'"
|
||||||
|
. "$cfg_file"
|
||||||
|
else
|
||||||
|
notify.error $"configuration file not found"": $cfg_file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
[ "$cfg_files_num" = 0 ] && notify.error $"configuration file not found"
|
||||||
|
}
|
||||||
|
@ -52,20 +52,20 @@ function usage() {
|
|||||||
@frontend@ [-C <conf_file>] --eval=<var>
|
@frontend@ [-C <conf_file>] --eval=<var>
|
||||||
|
|
||||||
"$"where the above options mean"":
|
"$"where the above options mean"":
|
||||||
--eval "$"Print the value of the configuration variable <var>""
|
--eval "$"Print the value of the configuration variable <var>""
|
||||||
-C, --config "$"Use an alternate configuration file"" <conf_file>""
|
--colors "$"Select the theme to be used for the colorized output""
|
||||||
"$"Default files:"" $default_cfg_strlist""
|
-C, --config "$"Use an alternate user configuration file"" <conf_file>""
|
||||||
"$"Default user files:"" $default_cfg_user_strlist""
|
"$"Default files:"" $default_cfg_strlist""
|
||||||
|
"$"Default user files:"" $default_cfg_user_strlist""
|
||||||
|
|
||||||
"$"Operation modes"":
|
"$"Operation modes"":
|
||||||
-h, --help "$"Print this help, then exit""
|
-h, --help "$"Print this help, then exit""
|
||||||
-V, --version "$"Print version number, then exit""
|
-V, --version "$"Print version number, then exit""
|
||||||
-q, --quiet "$"Run in quiet mode""
|
-q, --quiet "$"Run in quiet mode""
|
||||||
--colors "$"Select the theme to be used for the colorized output""
|
-D, --debug "$"Run in debugging mode (very verbose output)""
|
||||||
-D, --debug "$"Run in debugging mode (very verbose output)""
|
|
||||||
|
|
||||||
"$"Samples"":
|
"$"Samples"":
|
||||||
@frontend@ -q -C ${default_cfg[0]} --eval=\"logging_dir\"
|
@frontend@ -q -C ${default_cfg_list[0]} --eval=\"logging_dir\"
|
||||||
|
|
||||||
"$"Report bugs to <davide.madrisan@gmail.com>."
|
"$"Report bugs to <davide.madrisan@gmail.com>."
|
||||||
|
|
||||||
@ -104,16 +104,16 @@ eval set -- "$exec_options"
|
|||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-C|--config)
|
|
||||||
cfg_file=$2; shift ;;
|
|
||||||
--eval)
|
--eval)
|
||||||
autospecvar="$2"; shift ;;
|
autospecvar="$2"; shift ;;
|
||||||
|
--colors)
|
||||||
|
color_scheme="$2"; shift ;;
|
||||||
|
-C|--config)
|
||||||
|
cfg_file=$2; shift ;;
|
||||||
-D|--debug)
|
-D|--debug)
|
||||||
let "verbose = 2" ;;
|
let "verbose = 2" ;;
|
||||||
-q|--quiet)
|
-q|--quiet)
|
||||||
let "verbose = 0" ;;
|
let "verbose = 0" ;;
|
||||||
--colors)
|
|
||||||
color_scheme="$2"; shift ;;
|
|
||||||
-h|--help)
|
-h|--help)
|
||||||
usage 0 ;;
|
usage 0 ;;
|
||||||
-V|--version)
|
-V|--version)
|
||||||
@ -149,7 +149,7 @@ function config.getvar() {
|
|||||||
notify.error $"configuration file not found"" -- \`$cfg_file'"
|
notify.error $"configuration file not found"" -- \`$cfg_file'"
|
||||||
cfg_file_lst="$cfg_file"
|
cfg_file_lst="$cfg_file"
|
||||||
else
|
else
|
||||||
cfg_file_lst="${default_cfg[*]}"
|
cfg_file_lst="${default_cfg_list[*]}"
|
||||||
fi
|
fi
|
||||||
notify.debug "cfg_file_lst = \"$cfg_file_lst\""
|
notify.debug "cfg_file_lst = \"$cfg_file_lst\""
|
||||||
|
|
||||||
|
@ -54,19 +54,22 @@ function usage() {
|
|||||||
"$"Extract a given file or list of files from a srpm archive"".
|
"$"Extract a given file or list of files from a srpm archive"".
|
||||||
|
|
||||||
"$"Usage"":
|
"$"Usage"":
|
||||||
@frontend@ -x -F <file(s)> [--destdir=<dir>] <srpm_pck>
|
@frontend@ -x -F <file(s)> [-C <conf_file>] [--destdir=<dir>] <srpm_pck>
|
||||||
|
|
||||||
"$"where the above options mean"":
|
"$"where the above options mean"":
|
||||||
-x, --extract "$"Extract from the srpm package <srpm_pck>...""
|
-x, --extract "$"Extract from the srpm package <srpm_pck>...""
|
||||||
-F, --files "$"...the specified file or list of files <file(s)>""
|
-F, --files "$"...the specified file or list of files <file(s)>""
|
||||||
--destdir "$"Save extracted files in the directory <dir>""
|
--destdir "$"Save extracted files in the directory <dir>""
|
||||||
|
--colors "$"Select the theme to be used for the colorized output""
|
||||||
|
-C, --config "$"Use an alternate user configuration file"" <conf_file>""
|
||||||
|
"$"Default files:"" $default_cfg_strlist""
|
||||||
|
"$"Default user files:"" $default_cfg_user_strlist""
|
||||||
|
|
||||||
"$"Operation modes"":
|
"$"Operation modes"":
|
||||||
-h, --help "$"Print this help, then exit""
|
-h, --help "$"Print this help, then exit""
|
||||||
-V, --version "$"Print version number, then exit""
|
-V, --version "$"Print version number, then exit""
|
||||||
-q, --quiet "$"Run in quiet mode""
|
-q, --quiet "$"Run in quiet mode""
|
||||||
--colors "$"Select the theme to be used for the colorized output""
|
-D, --debug "$"Run in debugging mode (very verbose output)""
|
||||||
-D, --debug "$"Run in debugging mode (very verbose output)""
|
|
||||||
|
|
||||||
"$"Samples"":
|
"$"Samples"":
|
||||||
@frontend@ -x @package@-@version@-1mamba.src.rpm -F \\*.spec --destdir=/tmp/specs
|
@frontend@ -x @package@-@version@-1mamba.src.rpm -F \\*.spec --destdir=/tmp/specs
|
||||||
@ -96,10 +99,10 @@ for arg in $@; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
exec_options=`LC_ALL=C getopt \
|
exec_options=`LC_ALL=C getopt \
|
||||||
-o xF:DqrhV \
|
-o xF:C:DqrhV \
|
||||||
--long \
|
--long \
|
||||||
extract,files:,destdir:,\
|
extract,files:,destdir:,\
|
||||||
debug,quiet,colors:,help,version,\
|
debug,quiet,colors:,config:,help,version,\
|
||||||
frontend_opts: \
|
frontend_opts: \
|
||||||
-n "$me" -- "$@"`
|
-n "$me" -- "$@"`
|
||||||
[ $? = 0 ] || exit 1
|
[ $? = 0 ] || exit 1
|
||||||
@ -114,12 +117,14 @@ while :; do
|
|||||||
filelst="$2"; shift ;;
|
filelst="$2"; shift ;;
|
||||||
--destdir)
|
--destdir)
|
||||||
destdir="$2"; shift ;;
|
destdir="$2"; shift ;;
|
||||||
|
--colors)
|
||||||
|
color_scheme="$2"; shift ;;
|
||||||
|
-C|--config)
|
||||||
|
custom_cfgfile_list="$2"; shift ;;
|
||||||
-D|--debug)
|
-D|--debug)
|
||||||
let "verbose = 2" ;;
|
let "verbose = 2" ;;
|
||||||
-q|--quiet)
|
-q|--quiet)
|
||||||
let "verbose = 0" ;;
|
let "verbose = 0" ;;
|
||||||
--colors)
|
|
||||||
color_scheme="$2"; shift ;;
|
|
||||||
-h|--help)
|
-h|--help)
|
||||||
usage 0 ;;
|
usage 0 ;;
|
||||||
-V|--version)
|
-V|--version)
|
||||||
@ -137,6 +142,9 @@ done
|
|||||||
|
|
||||||
notify.enable_colors "$color_scheme"
|
notify.enable_colors "$color_scheme"
|
||||||
|
|
||||||
|
notify.debug "custom_cfgfile_list = \"$custom_cfgfile_list\""
|
||||||
|
cfg_load_files "$custom_cfgfile_list"
|
||||||
|
|
||||||
# s_rpm_pck : the name of the srpm package (local or remote)
|
# s_rpm_pck : the name of the srpm package (local or remote)
|
||||||
# (i.e. /usr/src/RPM/SRPMS/automake-1.9-1qilnx.src.rpm)
|
# (i.e. /usr/src/RPM/SRPMS/automake-1.9-1qilnx.src.rpm)
|
||||||
# filelst : list of file to extract (default is '*.spec', that is the specfile)
|
# filelst : list of file to extract (default is '*.spec', that is the specfile)
|
||||||
|
@ -97,7 +97,7 @@ function usage() {
|
|||||||
[--changelog \"msg\" ] [--nosrpm|--norpm] \\
|
[--changelog \"msg\" ] [--nosrpm|--norpm] \\
|
||||||
[--force-update] [--force-build] [--force-install] \\
|
[--force-update] [--force-build] [--force-install] \\
|
||||||
[--force-download] [--ignore-test t1[,t2,...]] \\
|
[--force-download] [--ignore-test t1[,t2,...]] \\
|
||||||
[-c] [-f] [-L] [-R]
|
[-c] [-f] [-L] [-R] [-C <conf_file>]
|
||||||
|
|
||||||
"$"where the above options mean"":
|
"$"where the above options mean"":
|
||||||
-u, --update "$"Update the package <pck> to version <ver> and release <rel>""
|
-u, --update "$"Update the package <pck> to version <ver> and release <rel>""
|
||||||
@ -146,21 +146,24 @@ function usage() {
|
|||||||
-L, --log "$"Unable logging to file (logging dir: \`\$logging_dir')""
|
-L, --log "$"Unable logging to file (logging dir: \`\$logging_dir')""
|
||||||
-R, --rebuild "$"Enable rebuilding mode and settings (action 4 only)""
|
-R, --rebuild "$"Enable rebuilding mode and settings (action 4 only)""
|
||||||
--root "$"Specify an alternative root directory to rpm""
|
--root "$"Specify an alternative root directory to rpm""
|
||||||
|
--colors "$"Select the theme to be used for the colorized output""
|
||||||
|
-C, --config "$"Use an alternate user configuration file"" <conf_file>""
|
||||||
|
"$"Default files:"" $default_cfg_strlist""
|
||||||
|
"$"Default user files:"" $default_cfg_user_strlist""
|
||||||
|
|
||||||
"$"Operation modes"":
|
"$"Operation modes"":
|
||||||
-h, --help "$"Print this help, then exit""
|
-h, --help "$"Print this help, then exit""
|
||||||
-V, --version "$"Print version number, then exit""
|
-V, --version "$"Print version number, then exit""
|
||||||
-q, --quiet "$"Run in quiet mode""
|
-q, --quiet "$"Run in quiet mode""
|
||||||
--colors "$"Select the theme to be used for the colorized output""
|
|
||||||
-D, --debug "$"Run in debugging mode (very verbose output)""
|
-D, --debug "$"Run in debugging mode (very verbose output)""
|
||||||
|
|
||||||
"$"Samples"":
|
"$"Samples"":
|
||||||
@frontend@ -u aPackage 0.1.2 -a4 -f --changelog \""$"changelog entry""\"
|
@frontend@ -u apck 0.1.2 -a4 -f --changelog \""$"changelog entry""\"
|
||||||
@frontend@ --log -u aPackage -a5,7:9 --force-build --define addons_ver=0.9
|
@frontend@ --log -u apck -a5,7:9 --force-build --define addons_ver=0.9
|
||||||
@frontend@ -c -u -l usr:pswd aPackage 0.1.2 -a10 --server-upload=1
|
@frontend@ -c -u -l usr:pswd apck 0.1.2 -a10 --server-upload=1
|
||||||
@frontend@ -u aPackage -a1,4,5 --arch=noarch --rebuild --ignore-test=6,7
|
@frontend@ -u apck -a1,4-8 -A noarch --rebuild --ignore-test=6,7 --colors=web
|
||||||
@frontend@ -u aPackage -a10 --norpm -S /var/tmp/specs/aPackage.spec
|
@frontend@ -u apck -a10 --norpm -S /var/tmp/specs/aPackage.spec
|
||||||
@frontend@ -u aPackage -a11 --force-install
|
@frontend@ -u apck -a11 --force-install -C ~/.autospec-alt.conf
|
||||||
|
|
||||||
"$"Report bugs to <davide.madrisan@gmail.com>."
|
"$"Report bugs to <davide.madrisan@gmail.com>."
|
||||||
|
|
||||||
@ -187,15 +190,15 @@ for arg in $@; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
exec_options=`LC_ALL=C getopt \
|
exec_options=`LC_ALL=C getopt \
|
||||||
-o ua:d:l:S:A:bcfLRDqrhV \
|
-o ua:d:l:S:A:bcfLRC:DqhV \
|
||||||
--long \
|
--long \
|
||||||
update,action:,define:,login:,specfile:,arch:,\
|
update,action:,define:,login:,specfile:,arch:,\
|
||||||
server-download:,server-upload:,server:,\
|
server-download:,server-upload:,server:,\
|
||||||
changelog:,nosrpm,norpm,list-check,update-autobuildreq,\
|
changelog:,nosrpm,norpm,list-check,update-autobuildreq,\
|
||||||
force-update,force-build,force-install,force-download,force,\
|
force-update,force-build,force-install,force-download,force,\
|
||||||
ignore-test:,clear,format,log,rebuild,root:,\
|
ignore-test:,clear,format,log,rebuild,root:,\
|
||||||
debug,quiet,colors:,help,version,\
|
frontend_opts:,colors:,config:,\
|
||||||
frontend_opts: \
|
debug,quiet,help,version \
|
||||||
-n "$me" -- "$@"`
|
-n "$me" -- "$@"`
|
||||||
[ $? = 0 ] || exit 1
|
[ $? = 0 ] || exit 1
|
||||||
|
|
||||||
@ -276,6 +279,8 @@ while :; do
|
|||||||
let "verbose = 0" ;;
|
let "verbose = 0" ;;
|
||||||
--colors)
|
--colors)
|
||||||
color_scheme="$2"; shift ;;
|
color_scheme="$2"; shift ;;
|
||||||
|
-C|--config)
|
||||||
|
custom_cfgfile_list="$2"; shift ;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
usage 0 ;;
|
usage 0 ;;
|
||||||
-V|--version)
|
-V|--version)
|
||||||
@ -309,6 +314,9 @@ fi
|
|||||||
[ "$logging" = "1" ] && color_scheme="none"
|
[ "$logging" = "1" ] && color_scheme="none"
|
||||||
notify.enable_colors "$color_scheme"
|
notify.enable_colors "$color_scheme"
|
||||||
|
|
||||||
|
notify.debug "custom_cfgfile_list = \"$custom_cfgfile_list\""
|
||||||
|
cfg_load_files "$custom_cfgfile_list"
|
||||||
|
|
||||||
# default values for non mandatory configuration variables
|
# default values for non mandatory configuration variables
|
||||||
[ "$logging_dir" ] || logging_dir="${tmppath_dir:-/var/tmp}/@package@"
|
[ "$logging_dir" ] || logging_dir="${tmppath_dir:-/var/tmp}/@package@"
|
||||||
|
|
||||||
|
@ -94,7 +94,8 @@ function usage() {
|
|||||||
|
|
||||||
"$"Usage"":
|
"$"Usage"":
|
||||||
@frontend@ -s <source-archive> [-n <name>] [-v <ver>] [-t <type>] \\
|
@frontend@ -s <source-archive> [-n <name>] [-v <ver>] [-t <type>] \\
|
||||||
[-o <outfile>] [--changelog \""$"message""\"] [<"$"git-opts"">]
|
[-o <outfile>] [--changelog \""$"message""\"] [<"$"git-opts"">] \\
|
||||||
|
[-C <conf_file>]
|
||||||
|
|
||||||
"$"where the above options mean"":
|
"$"where the above options mean"":
|
||||||
-s, --source "$"Try to create a specfile for the specified source archive""
|
-s, --source "$"Try to create a specfile for the specified source archive""
|
||||||
@ -110,15 +111,18 @@ function usage() {
|
|||||||
python : "$"specfile for python modules""
|
python : "$"specfile for python modules""
|
||||||
standard-daemon : "$"standard specfile for system/network services""
|
standard-daemon : "$"standard specfile for system/network services""
|
||||||
-o, --output "$"Redirect the output to the file <outfile>""
|
-o, --output "$"Redirect the output to the file <outfile>""
|
||||||
--changelog "$"Set change information for the package""
|
--changelog "$"Set change information for the package""
|
||||||
--git-branch "$"Specify a git branch""
|
--git-branch "$"Specify a git branch""
|
||||||
--preserve-dot-git "$"Do not remove git files""
|
--preserve-dot-git "$"Do not remove git files""
|
||||||
|
--colors "$"Select the theme to be used for the colorized output""
|
||||||
|
-C, --config "$"Use an alternate user configuration file"" <conf_file>""
|
||||||
|
"$"Default files:"" $default_cfg_strlist""
|
||||||
|
"$"Default user files:"" $default_cfg_user_strlist""
|
||||||
|
|
||||||
"$"Operation modes"":
|
"$"Operation modes"":
|
||||||
-h, --help "$"Print this help, then exit""
|
-h, --help "$"Print this help, then exit""
|
||||||
-V, --version "$"Print version number, then exit""
|
-V, --version "$"Print version number, then exit""
|
||||||
-q, --quiet "$"Run in quiet mode""
|
-q, --quiet "$"Run in quiet mode""
|
||||||
--colors "$"Select the theme to be used for the colorized output""
|
|
||||||
-D, --debug "$"Run in debugging mode (very verbose output)""
|
-D, --debug "$"Run in debugging mode (very verbose output)""
|
||||||
|
|
||||||
"$"Samples"":
|
"$"Samples"":
|
||||||
@ -156,11 +160,11 @@ done
|
|||||||
config.check4user
|
config.check4user
|
||||||
|
|
||||||
exec_options=`LC_ALL=C getopt \
|
exec_options=`LC_ALL=C getopt \
|
||||||
-o s:n:v:t:o:DqrhV \
|
-o s:n:v:t:o:C:DqrhV \
|
||||||
--long \
|
--long \
|
||||||
source:,pck-name:,pck-version:,type:,output:,changelog:,\
|
source:,pck-name:,pck-version:,type:,output:,changelog:,\
|
||||||
git-branch:,preserve-dot-git,\
|
git-branch:,preserve-dot-git,\
|
||||||
debug,quiet,colors:,help,version,\
|
colors:,config:,debug,quiet,help,version,\
|
||||||
frontend_opts: \
|
frontend_opts: \
|
||||||
-n "$me" -- "$@"`
|
-n "$me" -- "$@"`
|
||||||
[ $? = 0 ] || exit 1
|
[ $? = 0 ] || exit 1
|
||||||
@ -195,6 +199,8 @@ while :; do
|
|||||||
let "verbose = 0" ;;
|
let "verbose = 0" ;;
|
||||||
--colors)
|
--colors)
|
||||||
color_scheme="$2"; shift ;;
|
color_scheme="$2"; shift ;;
|
||||||
|
-C|--config)
|
||||||
|
custom_cfgfile_list="$2"; shift ;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
usage 0 ;;
|
usage 0 ;;
|
||||||
-V|--version)
|
-V|--version)
|
||||||
@ -211,6 +217,9 @@ for arg in $@; do
|
|||||||
notify.error $"unrecognized option"" -- \`$arg'"
|
notify.error $"unrecognized option"" -- \`$arg'"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
notify.debug "custom_cfgfile_list = \"$custom_cfgfile_list\""
|
||||||
|
cfg_load_files "$custom_cfgfile_list"
|
||||||
|
|
||||||
function specfile.ckeck_defvalues() {
|
function specfile.ckeck_defvalues() {
|
||||||
# $1: name of the specfile
|
# $1: name of the specfile
|
||||||
local specfile="$1" currvalue
|
local specfile="$1" currvalue
|
||||||
|
@ -58,9 +58,15 @@ msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
|
|||||||
msgid "Select the theme to be used for the colorized output"
|
msgid "Select the theme to be used for the colorized output"
|
||||||
msgstr "Seleziona il tema da usare per generare l'output colorato"
|
msgstr "Seleziona il tema da usare per generare l'output colorato"
|
||||||
|
|
||||||
|
msgid "Use an alternate user configuration file"
|
||||||
|
msgstr "Definisce uno o più file di configurazione utente alternativi"
|
||||||
|
|
||||||
msgid "Run in debugging mode (very verbose output)"
|
msgid "Run in debugging mode (very verbose output)"
|
||||||
msgstr "Attiva la modalità di debugging (output prolisso)"
|
msgstr "Attiva la modalità di debugging (output prolisso)"
|
||||||
|
|
||||||
|
msgid "Common options"
|
||||||
|
msgstr "Opzioni comuni"
|
||||||
|
|
||||||
msgid "Usage"
|
msgid "Usage"
|
||||||
msgstr "Utilizzo"
|
msgstr "Utilizzo"
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ msgstr "dove le precedenti opzioni significano"
|
|||||||
msgid "Print the value of the configuration variable <var>"
|
msgid "Print the value of the configuration variable <var>"
|
||||||
msgstr "Stampa il valore che <var> assume nei file di configurazione"
|
msgstr "Stampa il valore che <var> assume nei file di configurazione"
|
||||||
|
|
||||||
msgid "Use an alternate configuration file"
|
msgid "Use an alternate user configuration file"
|
||||||
msgstr "Utilizza un file di configurazione alternativo"
|
msgstr "Definisce uno o più file di configurazione utente alternativi"
|
||||||
|
|
||||||
msgid "Default files:"
|
msgid "Default files:"
|
||||||
msgstr "File di default:"
|
msgstr "File di default:"
|
||||||
|
@ -66,6 +66,15 @@ msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
|
|||||||
msgid "Select the theme to be used for the colorized output"
|
msgid "Select the theme to be used for the colorized output"
|
||||||
msgstr "Seleziona il tema da usare per generare l'output colorato"
|
msgstr "Seleziona il tema da usare per generare l'output colorato"
|
||||||
|
|
||||||
|
msgid "Use an alternate user configuration file"
|
||||||
|
msgstr "Definisce uno o più file di configurazione utente alternativi"
|
||||||
|
|
||||||
|
msgid "Default files:"
|
||||||
|
msgstr "File di default:"
|
||||||
|
|
||||||
|
msgid "Default user files:"
|
||||||
|
msgstr "File di default utente:"
|
||||||
|
|
||||||
msgid "Run in debugging mode (very verbose output)"
|
msgid "Run in debugging mode (very verbose output)"
|
||||||
msgstr "Attiva la modalità di debugging (output prolisso)"
|
msgstr "Attiva la modalità di debugging (output prolisso)"
|
||||||
|
|
||||||
|
@ -168,6 +168,15 @@ msgstr "Attiva modalità ed impostazioni di rebuild (azione 4)"
|
|||||||
msgid "Specify an alternative root directory to rpm"
|
msgid "Specify an alternative root directory to rpm"
|
||||||
msgstr "Definisce una root directory alternativa per rpm"
|
msgstr "Definisce una root directory alternativa per rpm"
|
||||||
|
|
||||||
|
msgid "Use an alternate user configuration file"
|
||||||
|
msgstr "Definisce uno o più file di configurazione utente alternativi"
|
||||||
|
|
||||||
|
msgid "Default files:"
|
||||||
|
msgstr "File di default:"
|
||||||
|
|
||||||
|
msgid "Default user files:"
|
||||||
|
msgstr "File di default utente:"
|
||||||
|
|
||||||
msgid "Operation modes"
|
msgid "Operation modes"
|
||||||
msgstr "Modalità operative"
|
msgstr "Modalità operative"
|
||||||
|
|
||||||
|
@ -88,6 +88,15 @@ msgstr "Specifica un branch git"
|
|||||||
msgid "Do not remove git files"
|
msgid "Do not remove git files"
|
||||||
msgstr "Non rimuove i file git"
|
msgstr "Non rimuove i file git"
|
||||||
|
|
||||||
|
msgid "Use an alternate user configuration file"
|
||||||
|
msgstr "Definisce uno o più file di configurazione utente alternativi"
|
||||||
|
|
||||||
|
msgid "Default files:"
|
||||||
|
msgstr "File di default:"
|
||||||
|
|
||||||
|
msgid "Default user files:"
|
||||||
|
msgstr "File di default utente:"
|
||||||
|
|
||||||
msgid "Operation modes"
|
msgid "Operation modes"
|
||||||
msgstr "Modalità operative"
|
msgstr "Modalità operative"
|
||||||
|
|
||||||
@ -100,9 +109,6 @@ msgstr "Stampa il numero di versione e termina il programma"
|
|||||||
msgid "Run in quiet mode"
|
msgid "Run in quiet mode"
|
||||||
msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
|
msgstr "Non stampa alcun dettaglio delle operazioni in esecuzione"
|
||||||
|
|
||||||
msgid "Select the theme to be used for the colorized output"
|
|
||||||
msgstr "Seleziona il tema da usare per generare l'output colorato"
|
|
||||||
|
|
||||||
msgid "Run in debugging mode (very verbose output)"
|
msgid "Run in debugging mode (very verbose output)"
|
||||||
msgstr "Attiva la modalità di debugging (output prolisso)"
|
msgstr "Attiva la modalità di debugging (output prolisso)"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user