Skip to content

Commit

Permalink
add message and improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
not-a-feature committed Mar 9, 2024
1 parent ff4f0f2 commit c985fd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@ pip install wd-fw-update

## Usage

Run
``bash
wd_fw_update
```
Follow the on-screen prompts to select the appropriate options for your firmware update.
The script will guide you through the process, and once completed, it will provide a summary of the update.
Depending on the update mode, it may prompt you to reboot or switch to the new slot.
## Command-Line Options
--version: Display the version of the firmware update tool.
Expand Down
5 changes: 4 additions & 1 deletion src/wd_fw_update/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def check_missing_dependencies():
Returns:
bool: True if any dependency is missing, False otherwise
"""
dependencies = ["nvme"] # List of commands to check
dependencies = ["sudo", "nvme"] # List of commands to check

return any(which(cmd) is None for cmd in dependencies)

Expand Down Expand Up @@ -396,10 +396,13 @@ def wd_fw_update():
The user will be prompted for version / model / slot selection.
"""
_logger.info("Starting firmware update process.")
print("Western Digital SSD Firmware Update Tool\n")

# Step 0: Check dependencies
if check_missing_dependencies():
print("Missing dependencies!")
print("Please install: ")
print(" sudo")
print(" nvme-cli")
exit(1)

Expand Down

0 comments on commit c985fd2

Please sign in to comment.