Make __matterbridge shellcheck-friendly
This commit is contained in:
parent
05a6b8aa42
commit
43562ff09c
1 changed files with 5 additions and 8 deletions
|
@ -55,8 +55,8 @@ config_dir=$(dirname $CONFIG_PATH)
|
||||||
systemd_unit_path='/etc/systemd/system/matterbridge.service'
|
systemd_unit_path='/etc/systemd/system/matterbridge.service'
|
||||||
|
|
||||||
# Check if curl is available.
|
# Check if curl is available.
|
||||||
if [ ! -x "$(which curl)" ]; then
|
if ! command -v curl; then
|
||||||
echo "curl is required for this type, but could not be found. Exiting." &>2
|
echo "curl is required for this type, but could not be found. Exiting." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -64,12 +64,9 @@ fi
|
||||||
mkdir -p "$__object/files"
|
mkdir -p "$__object/files"
|
||||||
|
|
||||||
# Download and check matterbridge binary.
|
# Download and check matterbridge binary.
|
||||||
curl -L $binary_url -o "$__object/files/$artefact"
|
curl -L "$binary_url" -o "$__object/files/$artefact"
|
||||||
curl -Ls $checksum_file_url | grep $artefact > "$__object/files/$checksum_file"
|
curl -Ls "$checksum_file_url" | grep "$artefact" > "$__object/files/$checksum_file"
|
||||||
ls $__object/files/ >&2
|
if ! (cd "$__object/files"; sha256sum --check $checksum_file); then
|
||||||
cat $__object/files/checksums.txt >&2
|
|
||||||
(cd "$__object/files"; sha256sum --check $checksum_file)
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Matterbridge binary checksum failed." >&2
|
echo "Matterbridge binary checksum failed." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue