In /usr/bin/apt-key line 5: export IFS="$(printf "\n\b")" ^-^ SC2155: Declare and assign separately to avoid masking return values. In /usr/bin/apt-key line 37: echo >&${GPGSTATUSFD} '[APTKEY:] WARNING' "$@" ^--------------^ SC2039: In POSIX sh, >& is undefined. ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: echo >&"${GPGSTATUSFD}" '[APTKEY:] WARNING' "$@" In /usr/bin/apt-key line 47: echo >&${GPGSTATUSFD} '[APTKEY:] ERROR' "$@" ^--------------^ SC2039: In POSIX sh, >& is undefined. ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: echo >&"${GPGSTATUSFD}" '[APTKEY:] ERROR' "$@" In /usr/bin/apt-key line 78: trap "${CURRENTTRAP}" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM ^------------^ SC2064: Use single quotes, otherwise this expands now rather than when signalled. In /usr/bin/apt-key line 97: local OLDIFS="$IFS" ^----------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 114: aptkey_execute "$GPG_SH" --keyring "$1" --with-colons --fingerprint | while read publine; do ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/apt-key line 118: while read fprline; do ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/apt-key line 145: all_add_keys="$(aptkey_execute "$GPG_SH" --keyring "$ADD_KEYRING" --with-colons --list-keys | grep ^[ps]ub | cut -d: -f5)" ^-----^ SC2062: Quote the grep pattern so the shell won't interpret it. In /usr/bin/apt-key line 160: local TMP_KEYRING="${GPGHOMEDIR}/tmp-keyring.gpg" ^---------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 187: local APT_DIR='/' ^-----------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 188: eval $(apt-config shell APT_DIR Dir) ^-----------------------------^ SC2046: Quote this to prevent word splitting. In /usr/bin/apt-key line 192: eval $(apt-config shell APT_KEY_NET_UPDATE_ENABLED APT::Key::Net-Update-Enabled) ^-- SC2046: Quote this to prevent word splitting. In /usr/bin/apt-key line 212: if [ -e $keyring ]; then ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ -e "$keyring" ]; then In /usr/bin/apt-key line 220: if [ $new_mtime -ne $old_mtime ]; then ^--------^ SC2086: Double quote to prevent globbing and word splitting. ^--------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$new_mtime" -ne "$old_mtime" ]; then In /usr/bin/apt-key line 250: get_fingerprints_of_keyring "$(dearmor_filename "$REMOVED_KEYS")" | while read key; do ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/apt-key line 259: local KEYRINGFILE="$1" ^---------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 266: local FINGERPRINTS="${GPGHOMEDIR}/keyringfile.keylst" ^----------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 267: local DEARMOR="$(dearmor_filename "$KEYRINGFILE")" ^-----------^ SC2039: In POSIX sh, 'local' is undefined. ^-----^ SC2155: Declare and assign separately to avoid masking return values. In /usr/bin/apt-key line 288: local REALTARGET ^--------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 325: local FILEEXT="${1##*.}" ^-----------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 349: local ACTION="$1" ^----------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 359: local TRUSTEDPARTS="/etc/apt/trusted.gpg.d" ^----------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 363: local TRUSTEDPARTSLIST="$(cd /; find "$TRUSTEDPARTS" -mindepth 1 -maxdepth 1 \( -name '*.gpg' -o -name '*.asc' \))" ^--------------------^ SC2039: In POSIX sh, 'local' is undefined. ^--------------^ SC2155: Declare and assign separately to avoid masking return values. In /usr/bin/apt-key line 374: local KEYRINGFILE="$1" ^---------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 383: if expr match "$(sed -n '2p' "${GPGHOMEDIR}/gpgoutput.log")" '^-\+$' >/dev/null 2>&1; then ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. In /usr/bin/apt-key line 399: local FROM="$1" ^--------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 400: local TO="$2" ^------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 411: local FROM="${1:-${GPGHOMEDIR}/pubring.gpg}" ^--------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 412: local TO="${2:-${GPGHOMEDIR}/pubring.gpg}" ^------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 425: local OPTS ^--------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 437: local EXPORTLIMIT="$1" ^---------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 439: local DEARMORTO="$(dearmor_filename "$TO")" ^-------------^ SC2039: In POSIX sh, 'local' is undefined. ^-------^ SC2155: Declare and assign separately to avoid masking return values. In /usr/bin/apt-key line 467: local trusted="${GPGHOMEDIR}/${1##*/}.gpg" ^-----------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 475: local trusted="${GPGHOMEDIR}/${1##*/}.gpg" ^-----------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/apt-key line 490: local PUBRING="$(readlink -f "${GPGHOMEDIR}")/pubring.gpg" ^-----------^ SC2039: In POSIX sh, 'local' is undefined. ^-----^ SC2155: Declare and assign separately to avoid masking return values. In /usr/bin/apt-key line 522: cut -f 2 "${GPGHOMEDIR}/pubring.diff" | while read key; do ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/apt-key line 527: cut -f 1 "${GPGHOMEDIR}/pubring.diff" | while read key; do ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/apt-key line 596: if [ -z "$FORCED_KEYRING" -o "$FORCED_KEYRING" = '/dev/null' ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. In /usr/bin/apt-key line 602: echo -n '' > "$FORCED_KEYRING" ^-- SC2039: In POSIX sh, echo flags are undefined. In /usr/bin/apt-key line 657: eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring) ^-- SC2046: Quote this to prevent word splitting. In /usr/bin/apt-key line 658: eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f) ^-- SC2046: Quote this to prevent word splitting. In /usr/bin/apt-key line 732: echo -n | aptkey_execute "$GPG" --batch --import >/dev/null 2>&1 || true ^-- SC2039: In POSIX sh, echo flags are undefined. In /usr/bin/apt-key line 810: eval $(apt-config shell GPGV Apt::Key::gpgvcommand) ^-- SC2046: Quote this to prevent word splitting. For more information: https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, 'local' is undefined. https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2062 -- Quote the grep pattern so the she...