From 4a04d6ad70609d7d276a6f6a09c4eeec21be5df1 Mon Sep 17 00:00:00 2001 From: "vitalii.semianchuk" Date: Wed, 1 Jul 2026 18:22:19 +0100 Subject: [PATCH] fix: undefined functions in shell scripts + typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit uninstall_nomad.sh was referencing color variables and a header_red function that were never defined — copied the definitions from the install script so error messages actually display properly. update_nomad.sh had the same header_red issue, plus the success message was copy-pasted from the install script and still said "installation completed" with a broken variable reference. also: - "comma-seperated" → "comma-separated" in the AI prompt template - "reserve the right accept" → "reserve the right to accept" in CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- admin/constants/ollama.ts | 2 +- install/uninstall_nomad.sh | 16 ++++++++++++++++ install/update_nomad.sh | 9 +++++++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 46e0558..5560607 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Thank you for your interest in contributing to Project N.O.M.A.D.! Community contributions are what keep this project growing and improving. Please read this guide fully before getting started — it will save you (and the maintainers) a lot of time. -> **Note:** Acceptance of contributions is not guaranteed. All pull requests are evaluated based on quality, relevance, and alignment with the project's goals. The maintainers of Project N.O.M.A.D. ("Nomad") reserve the right accept, deny, or modify any pull request at their sole discretion. +> **Note:** Acceptance of contributions is not guaranteed. All pull requests are evaluated based on quality, relevance, and alignment with the project's goals. The maintainers of Project N.O.M.A.D. ("Nomad") reserve the right to accept, deny, or modify any pull request at their sole discretion. --- diff --git a/admin/constants/ollama.ts b/admin/constants/ollama.ts index 17268d8..6431f63 100644 --- a/admin/constants/ollama.ts +++ b/admin/constants/ollama.ts @@ -130,7 +130,7 @@ Do NOT use: Return ONLY the 3 suggestions as a comma-separated list with no additional text, formatting, numbering, or quotation marks. The suggestions should be in title case. -Ensure that your suggestions are comma-seperated with no conjunctions like "and" or "or". +Ensure that your suggestions are comma-separated with no conjunctions like "and" or "or". Do not use line breaks, new lines, or extra spacing to separate the suggestions. Format: suggestion1, suggestion2, suggestion3 `, diff --git a/install/uninstall_nomad.sh b/install/uninstall_nomad.sh index be48931..e133657 100644 --- a/install/uninstall_nomad.sh +++ b/install/uninstall_nomad.sh @@ -9,6 +9,17 @@ # Author | Crosstalk Solutions, LLC # Website | https://crosstalksolutions.com +################################################################################################################################################################################################### +# # +# Color Codes # +# # +################################################################################################################################################################################################### + +RESET='\033[0m' +YELLOW='\033[1;33m' +RED='\033[1;31m' # Light Red. +GREEN='\033[1;32m' # Light Green. + ################################################################################################################################################################################################### # # # Constants & Variables # @@ -24,6 +35,11 @@ MANAGEMENT_COMPOSE_FILE="${NOMAD_DIR}/compose.yml" # # ################################################################################################################################################################################################### +header_red() { + if [[ "${script_option_debug}" != 'true' ]]; then clear; clear; fi + echo -e "${RED}#########################################################################${RESET}\\n" +} + check_has_sudo() { if sudo -n true 2>/dev/null; then echo -e "${GREEN}#${RESET} User has sudo permissions.\\n" diff --git a/install/update_nomad.sh b/install/update_nomad.sh index 4e35528..4afb6ae 100644 --- a/install/update_nomad.sh +++ b/install/update_nomad.sh @@ -28,6 +28,11 @@ GREEN='\033[1;32m' # Light Green. # # ################################################################################################################################################################################################### +header_red() { + if [[ "${script_option_debug}" != 'true' ]]; then clear; clear; fi + echo -e "${RED}#########################################################################${RESET}\\n" +} + check_has_sudo() { if sudo -n true 2>/dev/null; then echo -e "${GREEN}#${RESET} User has sudo permissions.\\n" @@ -134,9 +139,9 @@ get_local_ip() { } success_message() { - echo -e "${GREEN}#${RESET} Project N.O.M.A.D installation completed successfully!\\n" + echo -e "${GREEN}#${RESET} Project N.O.M.A.D update completed successfully!\\n" echo -e "${GREEN}#${RESET} Installation files are located at /opt/project-nomad\\n\n" - echo -e "${GREEN}#${RESET} Project N.O.M.A.D's Command Center should automatically start whenever your device reboots. However, if you need to start it manually, you can always do so by running: ${WHITE_R}${nomad_dir}/start_nomad.sh${RESET}\\n" + echo -e "${GREEN}#${RESET} Project N.O.M.A.D's Command Center should automatically start whenever your device reboots. However, if you need to start it manually, you can always do so by running: ${WHITE_R}/opt/project-nomad/start_nomad.sh${RESET}\\n" echo -e "${GREEN}#${RESET} You can now access the management interface at http://localhost:8080 or http://${local_ip_address}:8080\\n" echo -e "${GREEN}#${RESET} Thank you for supporting Project N.O.M.A.D!\\n" }