Project NOMAD is an offline-first knowledge and education server. Wikipedia, thousands of books, courses, maps, and optional local AI, all running on hardware you own with no internet required.
TypeScript
fix(install): Handle missing curl dependency on fresh Ubuntu installs
Chris Sherwoode8aabfce1e89
diff --git a/README.md b/README.mdindex 49a08aa7..26683bbd 100644--- a/README.md+++ b/README.md@@ -12,6 +12,12 @@ Project N.O.M.A.D. can be installed on any Debian-based operating system (we rec*Note: sudo/root privileges are required to run the install script*+#### One-liner (recommended for fresh Ubuntu installs)+```bash+sudo apt-get update && sudo apt-get install -y curl && curl -fsSL https://raw.githubusercontent.com/Crosstalk-Solutions/project-nomad/refs/heads/master/install/install_nomad.sh | sudo bash+```++#### Two-step install (if you already have curl)```bashcurl -fsSL https://raw.githubusercontent.com/Crosstalk-Solutions/project-nomad/refs/heads/master/install/install_nomad.sh -o install_nomad.sh```diff --git a/install/install_nomad.sh b/install/install_nomad.shindex 73de0da8..fc176b68 100644--- a/install/install_nomad.sh+++ b/install/install_nomad.sh@@ -92,6 +92,37 @@ check_is_debian_based() {echo -e "${GREEN}#${RESET} This script is running on a Debian-based system.\\n"}+ensure_dependencies_installed() {+ local missing_deps=()++ # Check for curl+ if ! command -v curl &> /dev/null; then+ missing_deps+=("curl")+ fi++ # Check for whiptail (used for dialogs, though not currently active)+ # if ! command -v whiptail &> /dev/null; then+ # missing_deps+=("whiptail")+ # fi++ if [[ ${#missing_deps[@]} -gt 0 ]]; then+ echo -e "${YELLOW}#${RESET} Installing required dependencies: ${missing_deps[*]}...\\n"+ sudo apt-get update+ sudo apt-get install -y "${missing_deps[@]}"++ # Verify installation+ for dep in "${missing_deps[@]}"; do+ if ! command -v "$dep" &> /dev/null; then+ echo -e "${RED}#${RESET} Failed to install $dep. Please install it manually and try again."+ exit 1+ fi+ done+ echo -e "${GREEN}#${RESET} Dependencies installed successfully.\\n"+ else+ echo -e "${GREEN}#${RESET} All required dependencies are already installed.\\n"+ fi+}+check_is_debug_mode(){# Check if the script is being run in debug modeif [[ "${script_option_debug}" == 'true' ]]; then@@ -401,6 +432,7 @@ success_message() {check_is_debian_basedcheck_is_bashcheck_has_sudo+ensure_dependencies_installedcheck_is_debug_mode# Main install