Hei hei, Am Montag, 28. Juni 2021, 08:42:13 CEST schrieb Michael Olbrich: > On Mon, Jun 28, 2021 at 01:11:20AM +0200, Roland Hieber wrote: > > Be uniform with bin/ptxdist, indent with one tab instead of mixed tabs > > and spaces. > > No. Everything is scripts is indented this way: Indention is 4 Spaces > tabwidth is 8 and tabs are not expanded. Blame Marc he started it this way
Maybe someone wants to craft an .editorconfig file to reflect that? ;-) https://editorconfig.org/ (Can also be project wide with a section for scripts with those special settings.) Greets Alex > > :-). > > Michael > > > Signed-off-by: Roland Hieber <r...@pengutronix.de> > > --- > > > > PATCH v2 (rhi): > > - new patch in v2 > > - not essential, but slowly start fixing indentation in scripts/lib > > - git show -w is empty > > > > --- > > > > scripts/lib/ptxd_lib_imx_hab.sh | 86 ++++++++++++++++----------------- > > 1 file changed, 43 insertions(+), 43 deletions(-) > > > > diff --git a/scripts/lib/ptxd_lib_imx_hab.sh > > b/scripts/lib/ptxd_lib_imx_hab.sh index fa5b3e2c1439..7af2b1112855 100644 > > --- a/scripts/lib/ptxd_lib_imx_hab.sh > > +++ b/scripts/lib/ptxd_lib_imx_hab.sh > > @@ -27,64 +27,64 @@ > > > > # This will contain the srk hash which must be written to the fuses > > # > > ptxd_make_imx_habv4_gen_table_impl() { > > > > - local group="${1}" > > - local template="${1}" > > - local srk_count="${2}" > > - local table_bin="${pkg_build_dir}/imx-srk-table.bin" > > - local srk_fuse_bin="${pkg_build_dir}/imx-srk-fuse.bin" > > - local -a certs > > - local i > > + local group="${1}" > > + local template="${1}" > > + local srk_count="${2}" > > + local table_bin="${pkg_build_dir}/imx-srk-table.bin" > > + local srk_fuse_bin="${pkg_build_dir}/imx-srk-fuse.bin" > > + local -a certs > > + local i > > > > - case "${template}" in > > - *%d*) # <template> [<srk_count>] > > - if [ -z "${srk_count}" ]; then > > - srk_count=4 > > - fi > > + case "${template}" in > > + *%d*) # <template> [<srk_count>] > > + if [ -z "${srk_count}" ]; then > > + srk_count=4 > > + fi > > > > - if [ "${srk_count}" -gt 4 ]; then > > - ptxd_bailout "HABv4 allows only 4 certificates" > > - fi > > + if [ "${srk_count}" -gt 4 ]; then > > + ptxd_bailout "HABv4 allows only 4 certificates" > > + fi > > > > - for i in $(seq ${srk_count}); do > > - certs[${#certs[*]}]="$(cs_get_ca "$(printf "${template}" > > ${i})")" > > - done > > - ;; > > + for i in $(seq ${srk_count}); do > > + certs[${#certs[*]}]="$(cs_get_ca "$(printf > > "${template}" $ {i})")" > > + done > > + ;; > > > > - *) # <role group> > > - local -a roles=( $(cs_group_get_roles "${group}") ) > > + *) # <role group> > > + local -a roles=( $(cs_group_get_roles "${group}") ) > > > > - if [ "${#roles[@]}" -eq 0 ]; then > > - ptxd_bailout "Failed to get roles for group '${group}'" > > - fi > > + if [ "${#roles[@]}" -eq 0 ]; then > > + ptxd_bailout "Failed to get roles for group > > '${group}'" > > + fi > > > > - if [ "${#roles[@]}" -gt 4 ]; then > > - ptxd_bailout "HABv4 allows only 4 certificates" > > - fi > > + if [ "${#roles[@]}" -gt 4 ]; then > > + ptxd_bailout "HABv4 allows only 4 certificates" > > + fi > > > > - for i in "${roles[@]}"; do > > - certs[${#certs[*]}]="$(cs_get_ca "${i}")" > > - done > > - esac > > + for i in "${roles[@]}"; do > > + certs[${#certs[*]}]="$(cs_get_ca "${i}")" > > + done > > + esac > > > > - echo -e "generating $(basename ${table_bin}) and $(basename > > ${srk_fuse_bin})\n" + echo -e "generating $(basename ${table_bin}) and > > $(basename ${srk_fuse_bin})\n" > > > > - local orig_IFS="${IFS}" > > - IFS="," > > - certs="${certs[*]}" > > - IFS="${orig_IFS}" > > + local orig_IFS="${IFS}" > > + IFS="," > > + certs="${certs[*]}" > > + IFS="${orig_IFS}" > > > > - ptxd_exec srktool --hab_ver 4 \ > > - --table "${table_bin}" \ > > - --efuses "${srk_fuse_bin}" \ > > - --digest sha256 \ > > - --certs "${certs}" > > + ptxd_exec srktool --hab_ver 4 \ > > + --table "${table_bin}" \ > > + --efuses "${srk_fuse_bin}" \ > > + --digest sha256 \ > > + --certs "${certs}" > > > > } > > export -f ptxd_make_imx_habv4_gen_table_impl > > > > ptxd_make_imx_habv4_gen_table() { > > > > - ptxd_make_world_init && > > + ptxd_make_world_init && > > > > - ptxd_eval \ > > + ptxd_eval \ > > > > "${pkg_make_env}" \ > > ptxd_make_imx_habv4_gen_table_impl "${@}" > > > > } _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-requ...@pengutronix.de