Skip to content

Commit

Permalink
Update install.sh: shellcheck changes
Browse files Browse the repository at this point in the history
  • Loading branch information
EricClaeys authored Oct 26, 2023
1 parent 3accf23 commit d282af8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ stop_allsky()
# Get the branch of the release we are installing;
get_this_branch()
{
# shellcheck disable=SC2119
if ! B="$( get_branch )" ; then
display_msg --log warning "Unable to determine branch; assuming '${BRANCH}'."
else
Expand Down Expand Up @@ -925,6 +926,7 @@ set_permissions()
# can write to the webserver root (is in the webserver group).
G="$( id "${ALLSKY_OWNER}" )"

# shellcheck disable=SC2076
if ! [[ ${G} =~ "(sudo)" ]]; then
display_msg --log progress "Adding ${ALLSKY_OWNER} to sudo group."

Expand All @@ -933,6 +935,7 @@ set_permissions()

sudo addgroup --quiet "${ALLSKY_OWNER}" "sudo"
fi
# shellcheck disable=SC2076
if ! [[ ${G} =~ "(${WEBSERVER_GROUP})" ]]; then
display_msg --log progress "Adding ${ALLSKY_OWNER} to ${WEBSERVER_GROUP} group."
sudo addgroup --quiet "${ALLSKY_OWNER}" "${WEBSERVER_GROUP}"
Expand Down Expand Up @@ -2919,6 +2922,7 @@ DEBUG_ARG=""
LOG_TYPE="--logonly" # by default we only log some messages but don't display
IN_TESTING="false"

# shellcheck disable=SC2119
[[ $( get_branch ) != "${GITHUB_MAIN_BRANCH}" ]] && IN_TESTING="true"

if [[ ${IN_TESTING} == "true" ]]; then
Expand Down

0 comments on commit d282af8

Please sign in to comment.