Skip to content

Commit 6c9484b

Browse files
committed
Fix SC2181 warnings
1 parent 36e3821 commit 6c9484b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

rpm/buildrpms.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,11 @@ then
135135

136136
print_info "Creating source package"
137137
# Build source package
138-
mock --buildsrpm --spec qgis.spec --sources ./sources \
138+
if mock --buildsrpm --spec qgis.spec --sources ./sources \
139139
--define "_relver $relver" \
140140
--define "_version $version" \
141141
--define "_timestamp $timestamp" \
142-
--resultdir=$OUTDIR $mock_args
143-
if [ $? -ne 0 ]
142+
--resultdir=$OUTDIR $mock_args -ne 0;
144143
then
145144
print_error "Creating source package failed"
146145
exit 1
@@ -167,12 +166,12 @@ do :
167166
rm $OUTDIR/$arch/build.log
168167
fi
169168
mkdir $OUTDIR/$arch
170-
mock -r $arch --rebuild $OUTDIR/$srpm \
169+
170+
if mock -r $arch --rebuild $OUTDIR/$srpm \
171171
--define "_relver $relver" \
172172
--define "_version $version" \
173173
--define "_timestamp $timestamp" \
174-
--resultdir=$OUTDIR/$arch $mock_args
175-
if [ $? -eq 0 ]
174+
--resultdir=$OUTDIR/$arch $mock_args -eq 0;
176175
then
177176
# Add to package list
178177
packages="$packages $(ls $OUTDIR/$arch/*-$version-$relver.*.rpm)"

tests/code_layout/test_shellcheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
DIR=$(git rev-parse --show-toplevel)
66

77
pushd ${DIR} > /dev/null || exit
8-
result=$(shellcheck -e SC2016,SC2015,SC2086,SC2002,SC1117,SC2154,SC2076,SC2046,SC1090,SC2038,SC2031,SC2030,SC2162,SC2196,SC2034,SC2044,SC2119,SC1001,SC2188,SC2119,SC2188,SC2120,SC2103,SC2059,SC2006,SC2221,SC2222,SC2120,SC2128,SC2005,SC2004,SC2013,SC2027,SC2090,SC2089,SC2124,SC2068,SC2035,SC2001,SC2010,SC1072,SC1073,SC1009,SC2166,SC2062,SC2045,SC2028,SC1091,SC2181,SC1083 $(find . -name '*.sh'))
8+
result=$(shellcheck -e SC2016,SC2015,SC2086,SC2002,SC1117,SC2154,SC2076,SC2046,SC1090,SC2038,SC2031,SC2030,SC2162,SC2196,SC2034,SC2044,SC2119,SC1001,SC2188,SC2119,SC2188,SC2120,SC2103,SC2059,SC2006,SC2221,SC2222,SC2120,SC2128,SC2005,SC2004,SC2013,SC2027,SC2090,SC2089,SC2124,SC2068,SC2035,SC2001,SC2010,SC1072,SC1073,SC1009,SC2166,SC2062,SC2045,SC2028,SC1091,SC1083 $(find . -name '*.sh'))
99
popd > /dev/null || exit
1010

1111
if [[ $result ]]; then

0 commit comments

Comments
 (0)