[arch-projects] [devtools] [PATCH] Sets usage message format to `usage: ...'

Lukas Fleischer archlinux at cryptocrack.de
Sun Dec 4 11:40:03 EST 2011


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 at 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 at 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


More information about the arch-projects mailing list