1
0
mirror of https://git.tukaani.org/xz.git synced 2025-10-05 16:58:17 +00:00

Scripts: Add shellcheck directives to silence warnings

Set also shell because the xz*.in files start with '#!@POSIX_SHELL@'.

SC1003 and SC2016 are only info messages, not warnings. Several other
shellcheck info messages remain. They are safe to ignore, but I didn't
want to disable them now.

Partially-fixes: https://github.com/tukaani-project/xz/issues/174
This commit is contained in:
Lasse Collin 2025-05-13 20:42:26 +03:00
parent 7844aff1a8
commit 4fc6208abe
No known key found for this signature in database
GPG Key ID: 38EE757D69184620
4 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# shellcheck shell=sh disable=SC1003,SC2016
@enable_path_for_scripts@
#SET_PATH - This line is a placeholder to ease patching this script.
@ -90,6 +92,8 @@ if test $# -eq 1; then
printf '%s\n' "$0: $1: Unknown compressed file name suffix" >&2
exit 2;;
esac
# The FILE variable is used with eval, and shellcheck doesn't see that.
# shellcheck disable=SC2034
case $1 in
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *[-.]lzo | *[-.]zst | *[-.]lz4)
FILE=`expr "X$1" : 'X\(.*\)[-.][abglmostxzZ24]*$'`;;

View File

@ -19,6 +19,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# shellcheck shell=sh disable=SC1003,SC2016
@enable_path_for_scripts@
#SET_PATH - This line is a placeholder to ease patching this script.

View File

@ -16,6 +16,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# shellcheck shell=sh disable=SC2089,SC2090
@enable_path_for_scripts@
#SET_PATH - This line is a placeholder to ease patching this script.

View File

@ -16,6 +16,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# shellcheck shell=sh
@enable_path_for_scripts@
#SET_PATH - This line is a placeholder to ease patching this script.