* [PATCH 1/2] merge_config.sh: Display usage if given too few arguments
@ 2014-12-11 20:55 Olof Johansson
2014-12-11 20:55 ` [PATCH 2/2] merge_config.sh: add -? for help Olof Johansson
2015-01-07 20:28 ` [PATCH 1/2] merge_config.sh: Display usage if given too few arguments Michal Marek
0 siblings, 2 replies; 6+ messages in thread
From: Olof Johansson @ 2014-12-11 20:55 UTC (permalink / raw)
To: yann.morin.1998; +Cc: linux-kbuild, dvhart, linux-kernel, Olof Johansson
Two or more arguments are always expected. Show usage and exit if
given less.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
scripts/kconfig/merge_config.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 81b0c61..2ab91b9 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -77,6 +77,11 @@ while true; do
esac
done
+if [ "$#" -lt 2 ] ; then
+ usage
+ exit
+fi
+
INITFILE=$1
shift;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] merge_config.sh: add -? for help
2014-12-11 20:55 [PATCH 1/2] merge_config.sh: Display usage if given too few arguments Olof Johansson
@ 2014-12-11 20:55 ` Olof Johansson
2014-12-24 4:51 ` Masahiro Yamada
` (2 more replies)
2015-01-07 20:28 ` [PATCH 1/2] merge_config.sh: Display usage if given too few arguments Michal Marek
1 sibling, 3 replies; 6+ messages in thread
From: Olof Johansson @ 2014-12-11 20:55 UTC (permalink / raw)
To: yann.morin.1998; +Cc: linux-kbuild, dvhart, linux-kernel, Olof Johansson
It's usual enough for help text that it makes sense to support it.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
scripts/kconfig/merge_config.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 2ab91b9..0c89537 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -28,11 +28,11 @@ trap clean_up HUP INT TERM
usage() {
echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
- echo " -h display this help text"
- echo " -m only merge the fragments, do not execute the make command"
- echo " -n use allnoconfig instead of alldefconfig"
- echo " -r list redundant entries when merging fragments"
- echo " -O dir to put generated output files"
+ echo " -h or -? display this help text"
+ echo " -m only merge the fragments, do not execute the make command"
+ echo " -n use allnoconfig instead of alldefconfig"
+ echo " -r list redundant entries when merging fragments"
+ echo " -O dir to put generated output files"
}
MAKE=true
@@ -52,7 +52,7 @@ while true; do
shift
continue
;;
- "-h")
+ "-h"|"-?")
usage
exit
;;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] merge_config.sh: add -? for help
2014-12-11 20:55 ` [PATCH 2/2] merge_config.sh: add -? for help Olof Johansson
@ 2014-12-24 4:51 ` Masahiro Yamada
2014-12-26 22:40 ` Darren Hart
2015-01-07 20:29 ` Michal Marek
2 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2014-12-24 4:51 UTC (permalink / raw)
To: Olof Johansson; +Cc: yann.morin.1998, linux-kbuild, dvhart, linux-kernel
Hi, Olof
Not that I care, but what does this patch improve?
On Thu, 11 Dec 2014 12:55:04 -0800
Olof Johansson <olof@lixom.net> wrote:
> It's usual enough for help text that it makes sense to support it.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
> scripts/kconfig/merge_config.sh | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
> index 2ab91b9..0c89537 100755
> --- a/scripts/kconfig/merge_config.sh
> +++ b/scripts/kconfig/merge_config.sh
> @@ -28,11 +28,11 @@ trap clean_up HUP INT TERM
>
> usage() {
> echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
> - echo " -h display this help text"
> - echo " -m only merge the fragments, do not execute the make command"
> - echo " -n use allnoconfig instead of alldefconfig"
> - echo " -r list redundant entries when merging fragments"
> - echo " -O dir to put generated output files"
> + echo " -h or -? display this help text"
> + echo " -m only merge the fragments, do not execute the make command"
> + echo " -n use allnoconfig instead of alldefconfig"
> + echo " -r list redundant entries when merging fragments"
> + echo " -O dir to put generated output files"
> }
>
> MAKE=true
> @@ -52,7 +52,7 @@ while true; do
> shift
> continue
> ;;
> - "-h")
> + "-h"|"-?")
> usage
> exit
> ;;
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] merge_config.sh: add -? for help
2014-12-11 20:55 ` [PATCH 2/2] merge_config.sh: add -? for help Olof Johansson
2014-12-24 4:51 ` Masahiro Yamada
@ 2014-12-26 22:40 ` Darren Hart
2015-01-07 20:29 ` Michal Marek
2 siblings, 0 replies; 6+ messages in thread
From: Darren Hart @ 2014-12-26 22:40 UTC (permalink / raw)
To: Olof Johansson, yann.morin.1998; +Cc: linux-kbuild, linux-kernel
No objection to the addition of -? if you find it useful.
Acked-by: Darren Hart <dvhart@linux.intel.com>
--
Darren Hart
Intel Open Source Technology Center
On 12/11/14, 12:55 PM, "Olof Johansson" <olof@lixom.net> wrote:
>It's usual enough for help text that it makes sense to support it.
>
>Signed-off-by: Olof Johansson <olof@lixom.net>
>---
> scripts/kconfig/merge_config.sh | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
>diff --git a/scripts/kconfig/merge_config.sh
>b/scripts/kconfig/merge_config.sh
>index 2ab91b9..0c89537 100755
>--- a/scripts/kconfig/merge_config.sh
>+++ b/scripts/kconfig/merge_config.sh
>@@ -28,11 +28,11 @@ trap clean_up HUP INT TERM
>
> usage() {
> echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
>- echo " -h display this help text"
>- echo " -m only merge the fragments, do not execute the make command"
>- echo " -n use allnoconfig instead of alldefconfig"
>- echo " -r list redundant entries when merging fragments"
>- echo " -O dir to put generated output files"
>+ echo " -h or -? display this help text"
>+ echo " -m only merge the fragments, do not execute the make
>command"
>+ echo " -n use allnoconfig instead of alldefconfig"
>+ echo " -r list redundant entries when merging fragments"
>+ echo " -O dir to put generated output files"
> }
>
> MAKE=true
>@@ -52,7 +52,7 @@ while true; do
> shift
> continue
> ;;
>- "-h")
>+ "-h"|"-?")
> usage
> exit
> ;;
>--
>1.7.10.4
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] merge_config.sh: Display usage if given too few arguments
2014-12-11 20:55 [PATCH 1/2] merge_config.sh: Display usage if given too few arguments Olof Johansson
2014-12-11 20:55 ` [PATCH 2/2] merge_config.sh: add -? for help Olof Johansson
@ 2015-01-07 20:28 ` Michal Marek
1 sibling, 0 replies; 6+ messages in thread
From: Michal Marek @ 2015-01-07 20:28 UTC (permalink / raw)
To: Olof Johansson; +Cc: yann.morin.1998, linux-kbuild, dvhart, linux-kernel
On Thu, Dec 11, 2014 at 12:55:03PM -0800, Olof Johansson wrote:
> Two or more arguments are always expected. Show usage and exit if
> given less.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
Applied to kbuild.git#kconfig, thanks.
Michal
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] merge_config.sh: add -? for help
2014-12-11 20:55 ` [PATCH 2/2] merge_config.sh: add -? for help Olof Johansson
2014-12-24 4:51 ` Masahiro Yamada
2014-12-26 22:40 ` Darren Hart
@ 2015-01-07 20:29 ` Michal Marek
2 siblings, 0 replies; 6+ messages in thread
From: Michal Marek @ 2015-01-07 20:29 UTC (permalink / raw)
To: Olof Johansson; +Cc: yann.morin.1998, linux-kbuild, dvhart, linux-kernel
On Thu, Dec 11, 2014 at 12:55:04PM -0800, Olof Johansson wrote:
> It's usual enough for help text that it makes sense to support it.
It's quite unusual for a *nix utility to recognize '-?'. And -h is
already supported.
Michal
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-07 20:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-11 20:55 [PATCH 1/2] merge_config.sh: Display usage if given too few arguments Olof Johansson
2014-12-11 20:55 ` [PATCH 2/2] merge_config.sh: add -? for help Olof Johansson
2014-12-24 4:51 ` Masahiro Yamada
2014-12-26 22:40 ` Darren Hart
2015-01-07 20:29 ` Michal Marek
2015-01-07 20:28 ` [PATCH 1/2] merge_config.sh: Display usage if given too few arguments Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).