[rtems-release commit] Use awk instead of cut -w

Chris Johns chrisj at rtems.org
Thu Feb 17 03:12:39 UTC 2022


Hi,

What platform you are testing this on?

Thanks
Chris

On 15/2/22 7:18 pm, Sebastian Huber wrote:
> Module:    rtems-release
> Branch:    master
> Commit:    3b918a72522145acbab700ca3e72dbe872a26005
> Changeset: http://git.rtems.org/rtems-release/commit/?id=3b918a72522145acbab700ca3e72dbe872a26005
> 
> Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
> Date:      Tue Feb 15 09:25:52 2022 +0100
> 
> Use awk instead of cut -w
> 
> The -w option is not supported by a GNU cut.
> 
> ---
> 
>  rtems-release-package | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rtems-release-package b/rtems-release-package
> index 351711d..6eb71ba 100755
> --- a/rtems-release-package
> +++ b/rtems-release-package
> @@ -70,7 +70,7 @@ cd ${git_local}
>   # Map the branch name to a specific package and release branch name
>   remote_branch=$(rtems_map_branch ${package} ${version})
>   echo "] Package ${package} ${version}: ${remote_branch}"
> - git_submodules=$(git submodule | cut -w -f 2)
> + git_submodules=$(git submodule | awk '{print $2}')
>   if [ -n "${git_submodules}" ]; then
>    echo "] git submodules found ...."
>    echo "git submodules init"
> @@ -83,7 +83,7 @@ cd ${git_local}
>     if [ "${ok}" != "no" ]; then
>      echo "git submodule update ${s}"
>      git submodule update ${s}
> -    treeish=$(git ls-tree HEAD ${s} | cut -w -f 3)
> +    treeish=$(git ls-tree HEAD ${s} | awk '{print $3}')
>      cd ${s}
>       echo "git archive --format=tar --prefix=${prefix}/${s}/ ${treeish}"
>       git archive --format=tar --prefix=${prefix}/${s}/ ${treeish} > \
> 
> _______________________________________________
> vc mailing list
> vc at rtems.org
> http://lists.rtems.org/mailman/listinfo/vc


More information about the devel mailing list