mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
ci: address ShellCheck issues in prepare.sh
In ./prepare.sh line 21: if [ $? -ne 0 ] ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In ./prepare.sh line 28: eval set -- ${opts} ^-----^ SC2086: Double quote to prevent globbing and word splitting. In ./prepare.sh line 55: echo ${ref} ^----^ SC2086: Double quote to prevent globbing and word splitting. In ./prepare.sh line 69: git clone --depth=1 ${gitrepo} ${workdir} ^--------^ SC2086: Double quote to prevent globbing and word splitting. ^--------^ SC2086: Double quote to prevent globbing and word splitting. In ./prepare.sh line 70: cd ${workdir} ^-----------^ SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. ^--------^ SC2086: Double quote to prevent globbing and word splitting. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
5ce5eb5be6
commit
f436143be1
@ -17,8 +17,9 @@ opts=$(getopt \
|
||||
--options "" \
|
||||
-- "$@"
|
||||
)
|
||||
ret=$?
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
if [ ${ret} -ne 0 ]
|
||||
then
|
||||
echo "Try '--help' for more information."
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user