fix(install): Handle missing curl dependency on fresh Ubuntu installs

- Add ensure_dependencies_installed function that checks for and installs curl
- Update README with one-liner install command for fresh systems
- Function is extensible for future dependency requirements

Fixes issue where fresh Ubuntu 24.04 installs fail because curl is not
installed by default.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Chris Sherwood 2026-01-28 13:01:41 -08:00 committed by Jake Turner
parent 08f9722b59
commit e8aabfce1e
2 changed files with 38 additions and 0 deletions

View File

@ -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)
```bash
curl -fsSL https://raw.githubusercontent.com/Crosstalk-Solutions/project-nomad/refs/heads/master/install/install_nomad.sh -o install_nomad.sh
```

View File

@ -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 mode
if [[ "${script_option_debug}" == 'true' ]]; then
@ -401,6 +432,7 @@ success_message() {
check_is_debian_based
check_is_bash
check_has_sudo
ensure_dependencies_installed
check_is_debug_mode
# Main install