non-portable shell code in type manifests/gencodes #155

Closed
opened 2021-11-20 15:20:22 +00:00 by ungleich-gitea · 2 comments

Created by: asteven

Running in a busybox environment it looks like I will be hitting few of these.
Using this ticket to group them and then submit a pull request later on.

e.g. __staged_file/gencode-remote uses mktemp --tmpdir, should be mktemp -p instead

*Created by: asteven* Running in a busybox environment it looks like I will be hitting few of these. Using this ticket to group them and then submit a pull request later on. e.g. __staged_file/gencode-remote uses mktemp --tmpdir, should be mktemp -p instead
Author
Owner

Created by: darko-poljak

This will be handled in https://github.com/ungleich/cdist/issues/540, so I am closing this one.

*Created by: darko-poljak* This will be handled in https://github.com/ungleich/cdist/issues/540, so I am closing this one.
Author
Owner

Created by: darko-poljak

Here is some POSIX related output form shellcheck

In ./__package_pkgng_freebsd/gencode-remote line 55:
   local _cmd=""
   ^-- SC2039: In POSIX sh, 'local' is undefined.

In ./__group/gencode-remote line 33:
      gid) echo "-g";;
                ^-- SC2039: In POSIX sh, echo flags are undefined.


In ./__group/gencode-remote line 34:
      password) echo "-p";;
                     ^-- SC2039: In POSIX sh, echo flags are undefined.


In ./__group/gencode-remote line 35:
      system) echo "-r";;
                   ^-- SC2039: In POSIX sh, echo flags are undefined.

In ./__install_partition_msdos_apply/gencode-remote line 32:
   local size=$1
   ^-- SC2039: In POSIX sh, 'local' is undefined.


In ./__install_partition_msdos_apply/gencode-remote line 33:
   local available_size="$2"
   ^-- SC2039: In POSIX sh, 'local' is undefined.


In ./__install_partition_msdos_apply/gencode-remote line 35:
   local number_suffix="$(echo ${size} | sed -e 's:\.[0-9]\+::' -e 's:\([0-9]\+\)\([KkMmGg%]\)[Bb]\?:\1|\2:')"
   ^-- SC2039: In POSIX sh, 'local' is undefined.


*Created by: darko-poljak* Here is some POSIX related output form `shellcheck` ``` In ./__package_pkgng_freebsd/gencode-remote line 55: local _cmd="" ^-- SC2039: In POSIX sh, 'local' is undefined. In ./__group/gencode-remote line 33: gid) echo "-g";; ^-- SC2039: In POSIX sh, echo flags are undefined. In ./__group/gencode-remote line 34: password) echo "-p";; ^-- SC2039: In POSIX sh, echo flags are undefined. In ./__group/gencode-remote line 35: system) echo "-r";; ^-- SC2039: In POSIX sh, echo flags are undefined. In ./__install_partition_msdos_apply/gencode-remote line 32: local size=$1 ^-- SC2039: In POSIX sh, 'local' is undefined. In ./__install_partition_msdos_apply/gencode-remote line 33: local available_size="$2" ^-- SC2039: In POSIX sh, 'local' is undefined. In ./__install_partition_msdos_apply/gencode-remote line 35: local number_suffix="$(echo ${size} | sed -e 's:\.[0-9]\+::' -e 's:\([0-9]\+\)\([KkMmGg%]\)[Bb]\?:\1|\2:')" ^-- SC2039: In POSIX sh, 'local' is undefined. ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#155
No description provided.