[arch-projects] [devtools] [PATCH] Sets usage message format to `usage: ...'
Sets the same usage message format in all the tools. Signed-off-by: Ricardo Catalinas Jiménez <jimenezrick@gmail.com> --- archbuild.in | 2 +- archco.in | 2 +- archrelease.in | 2 +- archrm.in | 2 +- makechrootpkg.in | 2 +- mkarchroot.in | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/archbuild.in b/archbuild.in index 502654c..b309ae2 100644 --- a/archbuild.in +++ b/archbuild.in @@ -19,7 +19,7 @@ chroots='/var/tmp/archbuild' clean_first=false usage() { - echo "usage $cmd" + echo "usage: $cmd" echo ' -c Recreate the chroot before building' echo ' -r <dir> Create chroots in this directory' exit 1 diff --git a/archco.in b/archco.in index be026b1..9a7d258 100644 --- a/archco.in +++ b/archco.in @@ -5,7 +5,7 @@ m4_include(lib/common.sh) scriptname=${0##*/} if [ "$1" = '' ]; then - echo 'Usage: '$scriptname' <package name>...' + echo 'usage: '$scriptname' <package name>...' exit 1 fi diff --git a/archrelease.in b/archrelease.in index 40b6c09..b9f3378 100644 --- a/archrelease.in +++ b/archrelease.in @@ -3,7 +3,7 @@ m4_include(lib/common.sh) if [[ -z $1 ]]; then - echo 'Usage: archrelease <repo>...' + echo 'usage: archrelease <repo>...' exit 1 fi diff --git a/archrm.in b/archrm.in index a4830ee..ca33053 100644 --- a/archrm.in +++ b/archrm.in @@ -3,7 +3,7 @@ m4_include(lib/common.sh) if [ "$1" = '' ]; then - echo 'Usage: archrm <path to checkout>' + echo 'usage: archrm <path to checkout>' exit 1 fi diff --git a/makechrootpkg.in b/makechrootpkg.in index 8a4b143..625ee0f 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -26,7 +26,7 @@ default_copy=$USER [[ -z $default_copy || $default_copy = root ]] && default_copy=copy usage() { - echo "usage ${0##*/} [options] -r <chrootdir> [--] [makepkg args]" + echo "usage: ${0##*/} [options] -r <chrootdir> [--] [makepkg args]" echo ' Run this script in a PKGBUILD dir to build a package inside a' echo ' clean chroot. All unrecognized arguments passed to this script' echo ' will be passed to makepkg.' diff --git a/mkarchroot.in b/mkarchroot.in index c35ba5b..051918f 100644 --- a/mkarchroot.in +++ b/mkarchroot.in @@ -20,7 +20,7 @@ APPNAME=$(basename "${0}") # usage: usage <exitvalue> usage() { - echo "usage ${APPNAME} [options] working-dir [package-list | app]" + echo "usage: ${APPNAME} [options] working-dir [package-list | app]" echo ' options:' echo ' -r <app> Run "app" within the context of the chroot' echo ' -u Update the chroot via pacman' -- 1.7.7.4
On Tue, Nov 29, 2011 at 01:01:56AM +0100, Ricardo Catalinas Jiménez wrote:
Sets the same usage message format in all the tools.
Signed-off-by: Ricardo Catalinas Jiménez <jimenezrick@gmail.com> --- archbuild.in | 2 +- archco.in | 2 +- archrelease.in | 2 +- archrm.in | 2 +- makechrootpkg.in | 2 +- mkarchroot.in | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
We're not done here. There's a lot more to unify. Anyway, good start. Merged this into "for-pierre" :) Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
diff --git a/archbuild.in b/archbuild.in index 502654c..b309ae2 100644 --- a/archbuild.in +++ b/archbuild.in @@ -19,7 +19,7 @@ chroots='/var/tmp/archbuild' clean_first=false
usage() { - echo "usage $cmd" + echo "usage: $cmd" echo ' -c Recreate the chroot before building' echo ' -r <dir> Create chroots in this directory' exit 1 diff --git a/archco.in b/archco.in index be026b1..9a7d258 100644 --- a/archco.in +++ b/archco.in @@ -5,7 +5,7 @@ m4_include(lib/common.sh) scriptname=${0##*/}
if [ "$1" = '' ]; then - echo 'Usage: '$scriptname' <package name>...' + echo 'usage: '$scriptname' <package name>...' exit 1 fi
diff --git a/archrelease.in b/archrelease.in index 40b6c09..b9f3378 100644 --- a/archrelease.in +++ b/archrelease.in @@ -3,7 +3,7 @@ m4_include(lib/common.sh)
if [[ -z $1 ]]; then - echo 'Usage: archrelease <repo>...' + echo 'usage: archrelease <repo>...' exit 1 fi
diff --git a/archrm.in b/archrm.in index a4830ee..ca33053 100644 --- a/archrm.in +++ b/archrm.in @@ -3,7 +3,7 @@ m4_include(lib/common.sh)
if [ "$1" = '' ]; then - echo 'Usage: archrm <path to checkout>' + echo 'usage: archrm <path to checkout>' exit 1 fi
diff --git a/makechrootpkg.in b/makechrootpkg.in index 8a4b143..625ee0f 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -26,7 +26,7 @@ default_copy=$USER [[ -z $default_copy || $default_copy = root ]] && default_copy=copy
usage() { - echo "usage ${0##*/} [options] -r <chrootdir> [--] [makepkg args]" + echo "usage: ${0##*/} [options] -r <chrootdir> [--] [makepkg args]" echo ' Run this script in a PKGBUILD dir to build a package inside a' echo ' clean chroot. All unrecognized arguments passed to this script' echo ' will be passed to makepkg.' diff --git a/mkarchroot.in b/mkarchroot.in index c35ba5b..051918f 100644 --- a/mkarchroot.in +++ b/mkarchroot.in @@ -20,7 +20,7 @@ APPNAME=$(basename "${0}")
# usage: usage <exitvalue> usage() { - echo "usage ${APPNAME} [options] working-dir [package-list | app]" + echo "usage: ${APPNAME} [options] working-dir [package-list | app]" echo ' options:' echo ' -r <app> Run "app" within the context of the chroot' echo ' -u Update the chroot via pacman' -- 1.7.7.4
Am 29.11.2011 01:01, schrieb Ricardo Catalinas Jiménez:
Sets the same usage message format in all the tools.
Signed-off-by: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
We should decide whether we capitalize the first word or not: https://projects.archlinux.org/devtools.git/commit/?id=42d821ef7b9cfdf4a4015... -- Pierre Schmitz, http://pierre-schmitz.com
On Sun, Dec 04, 2011 at 06:10:29PM +0100, Pierre Schmitz wrote:
Am 29.11.2011 01:01, schrieb Ricardo Catalinas Jiménez:
Sets the same usage message format in all the tools.
Signed-off-by: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
We should decide whether we capitalize the first word or not: https://projects.archlinux.org/devtools.git/commit/?id=42d821ef7b9cfdf4a4015...
I'm fine with keeping lower case usage messages, while having capitalized error messages. If you really want consistency here, I'm for using lower case everywhere :)
-- Pierre Schmitz, http://pierre-schmitz.com
participants (3)
-
Lukas Fleischer
-
Pierre Schmitz
-
Ricardo Catalinas Jiménez