From 29b2dbbab50ae2b146d6323f7c38875991b88365 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Tue, 20 Feb 2024 13:50:17 -0500 Subject: [PATCH 1/2] Add external sources --- .github/workflows/linting.yml | 2 ++ .shellcheckrc | 1 + scripts/auto_reboot.sh | 2 +- scripts/backup.sh | 2 +- scripts/compile-settings.sh | 2 +- scripts/discord.sh | 2 +- scripts/helper_functions.sh | 2 +- scripts/init.sh | 2 +- scripts/restore.sh | 2 +- scripts/start.sh | 2 +- scripts/update.sh | 2 +- 11 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 .shellcheckrc diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index d243e4484..9d94c894b 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -14,6 +14,8 @@ jobs: - name: Shellcheck uses: ludeeus/action-shellcheck@2.0.0 + with: + config_file: .shellcheckrc dockerlint: name: Lint - Docker diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 000000000..8226afb6b --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1 @@ +external-sources=true diff --git a/scripts/auto_reboot.sh b/scripts/auto_reboot.sh index 13f1de424..164e3e9d3 100644 --- a/scripts/auto_reboot.sh +++ b/scripts/auto_reboot.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck source=/dev/null +# shellcheck source=scripts/helper_functions.sh source "/home/steam/server/helper_functions.sh" if [ "${RCON_ENABLED,,}" != true ]; then diff --git a/scripts/backup.sh b/scripts/backup.sh index 119ffa126..1cb1da998 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck source=/dev/null +# shellcheck source=scripts/helper_functions.sh source "/home/steam/server/helper_functions.sh" DiscordMessage "Creating backup..." "in-progress" diff --git a/scripts/compile-settings.sh b/scripts/compile-settings.sh index d314b42e0..a7a64f75f 100755 --- a/scripts/compile-settings.sh +++ b/scripts/compile-settings.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck source=/dev/null +# shellcheck source=scripts/helper_functions.sh source "/home/steam/server/helper_functions.sh" config_file="/palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini" diff --git a/scripts/discord.sh b/scripts/discord.sh index ba30a48c9..0a890b867 100644 --- a/scripts/discord.sh +++ b/scripts/discord.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck source=/dev/null +# shellcheck source=scripts/helper_functions.sh source "/home/steam/server/helper_functions.sh" # Defaults diff --git a/scripts/helper_functions.sh b/scripts/helper_functions.sh index 41921f1c7..741c3f0b3 100644 --- a/scripts/helper_functions.sh +++ b/scripts/helper_functions.sh @@ -135,5 +135,5 @@ RCON() { } # Helper Functions for installation & updates -# shellcheck source=/dev/null +# shellcheck source=scripts/helper_install.sh source "/home/steam/server/helper_install.sh" \ No newline at end of file diff --git a/scripts/init.sh b/scripts/init.sh index 0c03448e9..675a4ef02 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck source=/dev/null +# shellcheck source=scripts/helper_functions.sh source "/home/steam/server/helper_functions.sh" if [[ "$(id -u)" -eq 0 ]] && [[ "$(id -g)" -eq 0 ]]; then diff --git a/scripts/restore.sh b/scripts/restore.sh index 9f4bac15b..7c918652d 100644 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck source=/dev/null +# shellcheck source=scripts/helper_functions.sh source "/home/steam/server/helper_functions.sh" # Backup file directory path diff --git a/scripts/start.sh b/scripts/start.sh index e15b47b0f..c1c120989 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck source=/dev/null +# shellcheck source=scripts/helper_functions.sh source "/home/steam/server/helper_functions.sh" dirExists "/palworld" || exit diff --git a/scripts/update.sh b/scripts/update.sh index 5489bf5c9..4e2685eca 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck source=/dev/null +# shellcheck source=scripts/helper_functions.sh source "/home/steam/server/helper_functions.sh" UpdateRequired From 0703b4d74423c57d221b2cce530301db8e25a7f1 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Tue, 20 Feb 2024 13:52:52 -0500 Subject: [PATCH 2/2] Removed with file for shell lint --- .github/workflows/linting.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 9d94c894b..d243e4484 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -14,8 +14,6 @@ jobs: - name: Shellcheck uses: ludeeus/action-shellcheck@2.0.0 - with: - config_file: .shellcheckrc dockerlint: name: Lint - Docker