Skip to content

Commit fb7a6d3

Browse files
committed
fix shellcheck err
1 parent dc7993e commit fb7a6d3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/ghe-host-check

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ if [ -z "$supported" ]; then
144144
exit 1
145145
fi
146146

147-
if [[ "$CALLING_SCRIPT" == "ghe-backup" ]]; then
147+
if [[ "$CALLING_SCRIPT" != "ghe-backup" ]]; then
148148
# Bring in the requirements file
149149
min_rsync=""
150150
min_openssh=""
@@ -214,8 +214,9 @@ DATA_TRANSFER_SIZE
214214
echo "Please make sure you have the minimum required version of rsync: $min_rsync installed" 1>&2
215215
exit 1
216216
elif awk "BEGIN {exit !($rsync_version < 3.2.5)}" &> /dev/null && [ "$RSYNC_WARNING" != "no" ]; then
217-
warn_mesg="**WARNING: rsync version $rsync_version on backup host is less than 3.2.5. For more details, please read documentation at https://github.com/github/backup-utils/blob/master/docs/requirements.md#april-2023-update-of-rsync-requirements\nIf you feel this warning doesn't apply anymore, you can disable it by updating RSYNC_WARNING to 'no' in your backup.config file.\n"
218-
echo -e $warn_mesg 1>&2
217+
warn_mesg=("**WARNING: rsync version $rsync_version on backup host is less than 3.2.5. For more details, please read documentation at https://github.com/github/backup-utils/blob/master/docs/requirements.md#april-2023-update-of-rsync-requirements"
218+
"If you feel this warning doesn't apply anymore, you can disable it by updating RSYNC_WARNING to 'no' in your backup.config file.")
219+
printf "%s\n" "${warn_mesg[@]}" 1>&2
219220
fi
220221
echo "rsync ${rsync_version} >= required ($min_rsync)" 1>&2
221222

0 commit comments

Comments
 (0)