Skip to content

Commit 5f84b93

Browse files
author
Himani Deshpande
committed
[AL2023]Changeing the syntax for the command as it gives error for not returning a numerical value
1 parent 5f14ef7 commit 5f84b93

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

util/cinc-install.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,14 @@ do_python() {
220220
do_checksum() {
221221
if exists sha256sum; then
222222
echo "Comparing checksum with sha256sum..."
223-
checksum=$(sha256sum $1 | awk '{ print $1 }')
224-
return "$(test "x$checksum" = "x$2")"
223+
checksum=`sha256sum $1 | awk '{ print $1 }'`
224+
# shellcheck disable=SC2046
225+
return `test "x$checksum" = "x$2"`
225226
elif exists shasum; then
226227
echo "Comparing checksum with shasum..."
227-
checksum=$(shasum -a 256 $1 | awk '{ print $1 }')
228-
return "$(test "x$checksum" = "x$2")"
228+
checksum=`shasum -a 256 $1 | awk '{ print $1 }'`
229+
# shellcheck disable=SC2046
230+
return `test "x$checksum" = "x$2"`
229231
else
230232
echo "WARNING: could not find a valid checksum program, pre-install shasum or sha256sum in your O/S image to get validation..."
231233
return 0
@@ -331,7 +333,8 @@ install_file() {
331333
echo "installing dmg file..."
332334
hdiutil detach "/Volumes/cinc_project" >/dev/null 2>&1 || true
333335
hdiutil attach "$2" -mountpoint "/Volumes/cinc_project"
334-
cd / && /usr/sbin/installer -pkg "$(find "/Volumes/cinc_project" -name \*.pkg)" -target /
336+
# shellcheck disable=SC2046
337+
cd / && /usr/sbin/installer -pkg `find "/Volumes/cinc_project" -name \*.pkg` -target /
335338
hdiutil detach "/Volumes/cinc_project"
336339
;;
337340
"sh" )

0 commit comments

Comments
 (0)