[lxc-devel] [PATCH 2/5] lxc-alpine: indent fixes

Stéphane Graber stgraber at ubuntu.com
Wed Jan 2 18:05:44 UTC 2013


On 12/31/2012 02:49 PM, Natanael Copa wrote:
> Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>

Looks good. Pushed.

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  templates/lxc-alpine.in | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
> index 6f7c90d..7787e75 100644
> --- a/templates/lxc-alpine.in
> +++ b/templates/lxc-alpine.in
> @@ -136,41 +136,41 @@ optarg_check() {
>  default_path=@LXCPATH@
>  
>  while [ $# -gt 0 ]; do
> -        opt="$1"
> -        shift
> -        case "$opt" in
> -        -h|--help)
> +    opt="$1"
> +    shift
> +    case "$opt" in
> +    -h|--help)
>          usage
>          exit 0
>          ;;
> -        -n|--name)
> +    -n|--name)
>          optarg_check $opt "$1"
>          name=$1
>          shift
>          ;;
> -        -p|--path)
> +    -p|--path)
>          optarg_check $opt "$1"
>          path=$1
>          shift
>          ;;
> -            --)
> +    --)
>          break;;
> -        --*=*)
> -            # split --myopt=foo=bar into --myopt foo=bar
> -            set -- ${opt%=*} ${opt#*=} "$@"
> +    --*=*)
> +        # split --myopt=foo=bar into --myopt foo=bar
> +        set -- ${opt%=*} ${opt#*=} "$@"
>          ;;
> -        -?)
> +    -?)
>          usage_err "unknown option '$opt'"
>          ;;
> -        -*)
> +    -*)
>          # split opts -abc into -a -b -c
>          set -- $(echo "${opt#-}" | sed 's/\(.\)/ -\1/g') "$@"
>          ;;
> -            *)
> +    *)
>          usage
>          exit 1
>          ;;
> -        esac
> +    esac
>  done
>  
>  
> 


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130102/a9acb091/attachment.pgp>


More information about the lxc-devel mailing list